• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/router/libiconv-1.14/libcharset/tools/
1#! /bin/sh
2# Prints the list of all locale names, one per line.
3
4locale -a
5test $? = 0 && exit 0
6
7host=`/bin/sh ../build-aux/config.guess`
8host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
9host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
10host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
11
12case "$host_os" in
13  sunos* | solaris*)
14    cd /usr/lib/locale && ls -1
15    ;;
16  freebsd*)
17    cd /usr/share/locale && ls -1
18    ;;
19  darwin* | openbsd*)
20    echo C
21    cd /usr/share/locale && ls -1 */LC_CTYPE | sed -e 's,/LC_CTYPE$,,'
22    ;;
23  *)
24    echo "Don't know how to determine list of locales on $host_os" 1>&2
25    exit 1
26    ;;
27esac
28