summaryrefslogtreecommitdiff
path: root/cross/mips64el-unknown-linux-gnu-glibc/locale-gen
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-01-18 12:42:10 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2012-01-18 12:42:10 -0300
commit58faf58ac673072759ab324865264e97083e2463 (patch)
tree72fb91a453ede6ec387b3f06eda43fc9aa6cb611 /cross/mips64el-unknown-linux-gnu-glibc/locale-gen
parent8b17c0c06c905cf95978e79c8077ac76304a37fd (diff)
downloadabslibre-58faf58ac673072759ab324865264e97083e2463.tar.gz
abslibre-58faf58ac673072759ab324865264e97083e2463.tar.bz2
abslibre-58faf58ac673072759ab324865264e97083e2463.zip
Preparing final mips64el-gcc
Diffstat (limited to 'cross/mips64el-unknown-linux-gnu-glibc/locale-gen')
-rwxr-xr-xcross/mips64el-unknown-linux-gnu-glibc/locale-gen42
1 files changed, 42 insertions, 0 deletions
diff --git a/cross/mips64el-unknown-linux-gnu-glibc/locale-gen b/cross/mips64el-unknown-linux-gnu-glibc/locale-gen
new file mode 100755
index 000000000..5aff344c4
--- /dev/null
+++ b/cross/mips64el-unknown-linux-gnu-glibc/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."