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*) 20 cd /usr/share/locale && ls -1 */LC_CTYPE | sed -e 's,/LC_CTYPE$,,' 21 ;; 22 *) 23 echo "Don't know how to determine list of locales on $host_os" 1>&2 24 exit 1 25 ;; 26esac 27