]> git.pld-linux.org Git - packages/glibc.git/blobdiff - glibc-localedb-gen
- rel 10; update from upstream
[packages/glibc.git] / glibc-localedb-gen
old mode 100644 (file)
new mode 100755 (executable)
index acaca34..53c627c
@@ -47,6 +47,7 @@ done
 
 if [ "${SUPPORTED_LOCALES}" = "x" ]; then
        echo "SUPPORTED_LOCALES not set"
+       echo "You can set it in /etc/sysconfig/i18n file"
        exit 1
 fi
 
@@ -57,6 +58,7 @@ fi
 
 rm -rf ${DESTDIR}${LOCDIR}
 install -d ${DESTDIR}${LOCDIR}
+cd ${DESTDIR}${LOCDIR}
 
 if [ "${DESTDIR}" = "" ]; then
        DESTDIROPT=
@@ -64,6 +66,7 @@ else
        DESTDIROPT="--prefix ${DESTDIR}"
 fi
 
+rc=0
 for loc in ${SUPPORTED_LOCALES} ; do
        if echo ${loc} | grep -q / ; then
                chset="`echo ${loc} | sed -e 's@^.*/@@'`"
@@ -76,13 +79,16 @@ for loc in ${SUPPORTED_LOCALES} ; do
                echo "Charset not known for locale ${loc} - skipping..."
                continue
        fi
+       iloc="`echo ${loc} | sed -e 's/\.[^@]*//'`"
        echo -n "Generating ${loc} using charset ${chset}... "
        if [ "${OLD_STYLE}" = "yes" ]; then
-               localedef -f ${chset} -i ${loc} ${DESTDIR}${LOCDIR}${loc}
+               localedef -f ${chset} -i ${iloc} ${DESTDIR}${LOCDIR}${loc}
        else
-               localedef -f ${chset} -i ${loc} ${loc} ${DESTDIROPT}
+               localedef -f ${chset} -i ${iloc} ${loc} ${DESTDIROPT}
        fi
+       rc=$(($rc + $?))
        echo
 done
 
 echo "DONE."
+exit $rc
This page took 0.062877 seconds and 4 git commands to generate.