diff options
author | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-01-14 10:49:22 -0300 |
---|---|---|
committer | Nicolás Reynolds <apoyosis@correo.inta.gob.ar> | 2012-01-14 10:49:22 -0300 |
commit | 6b82531c7cd628b3abbec5cf7b63b5dd41bafa22 (patch) | |
tree | 74ea8a80de3c9acb8a8d71e1fb228873af04ba37 /cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale-gen | |
parent | ebf07becb8601529398326043e0030cc5150f8d2 (diff) |
Work done so far, decided to follow crosstool-ng log
Diffstat (limited to 'cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale-gen')
-rwxr-xr-x | cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale-gen | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale-gen b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale-gen new file mode 100755 index 000000000..5aff344c4 --- /dev/null +++ b/cross/cross-mips64el-unknown-linux-gnu-glibc-headers/locale-gen @@ -0,0 +1,42 @@ +#!/bin/sh + +set -e + +LOCALEGEN=/etc/locale.gen +LOCALES=/usr/share/i18n/locales +if [ -n "$POSIXLY_CORRECT" ]; then + unset POSIXLY_CORRECT +fi + + +[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0; + +# Remove all old locale dir and locale-archive before generating new +# locale data. +rm -rf /usr/lib/locale/* || true + +umask 022 + +is_entry_ok() { + if [ -n "$locale" -a -n "$charset" ] ; then + true + else + echo "error: Bad entry '$locale $charset'" + false + fi +} + +echo "Generating locales..." +while read locale charset; do \ + case $locale in \#*) continue;; "") continue;; esac; \ + is_entry_ok || continue + echo -n " `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \ + echo -n ".$charset"; \ + echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \ + echo -n '...'; \ + if [ -f $LOCALES/$locale ]; then input=$locale; else \ + input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \ + localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \ + echo ' done'; \ +done < $LOCALEGEN +echo "Generation complete." |