Prepare for Unicode 3.1 support.
[libiconv.git] / libcharset / tools / all-locales
bloba6f38f1fc6337d5194e61a03c271b1c006f7d704
1 #! /bin/sh
2 # Prints the list of all locale names, one per line.
4 locale -a
5 test $? = 0 && exit 0
7 host=`/bin/sh ../autoconf/config.guess`
8 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
9 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
10 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12 case "$host_os" in
13 sunos* | solaris*)
14 cd /usr/lib/locale && ls -1
16 freebsd*)
17 cd /usr/share/locale && ls -1
20 echo "Don't know how to determine list of locales on $host_os" 1>&2
21 exit 1
23 esac