Annotation of embedaddon/libiconv/libcharset/tools/all-locales, revision 1.1.1.1
1.1 misho 1: #! /bin/sh
2: # Prints the list of all locale names, one per line.
3:
4: locale -a
5: test $? = 0 && exit 0
6:
7: host=`/bin/sh ../build-aux/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/'`
11:
12: case "$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: ;;
27: esac
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>