diff options
Diffstat (limited to 'libjava/classpath/scripts/generate-locale-list.sh')
-rwxr-xr-x | libjava/classpath/scripts/generate-locale-list.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libjava/classpath/scripts/generate-locale-list.sh b/libjava/classpath/scripts/generate-locale-list.sh index fb55c1c2838..3c6809de1dd 100755 --- a/libjava/classpath/scripts/generate-locale-list.sh +++ b/libjava/classpath/scripts/generate-locale-list.sh @@ -40,18 +40,30 @@ echo "obligated to do so. If you do not wish to do so, delete this" echo "exception statement from your version. */" echo echo -echo "package java.util;" +echo "package gnu.java.locale;" echo echo "// This file was automatically generated by scripts/generate-locale-list.sh" echo echo echo "class LocaleData" echo "{" -echo " public static String[] localeNames =" +echo " public static final String[] localeNames =" echo " {" ( cd $CLASSPATH_SRCDIR/resource/gnu/java/locale ; ls LocaleInformation_*.properties ) | xargs -n 1 echo | sed -e 's/LocaleInformation_\(.*\)\.properties/\1/' | while read locale ; do echo " \"$locale\"," ; done echo " };" + +echo +echo " public static final String[] collatorLocaleNames =" +echo " {" + +( cd $CLASSPATH_SRCDIR/resource/gnu/java/locale; grep -l collation_rules LocaleInformation_*.properties) | + xargs -n 1 echo | sed -e 's/LocaleInformation_\(.*\)\.properties/\1/' | + sed -e '/^$/ d' | + while read locale ; do echo " \"$locale\"," ; done + +echo " };" + echo "}" |