[ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
[ -f /etc/sysconfig/localedb ] && . /etc/sysconfig/localedb
-LOCDIR=/usr/lib/locale
+LOCDIR=@localedir@
ARCHIVE=${LOCDIR}/locale-archive
while [ $# -gt 0 ]; do
if [ "${SUPPORTED_LOCALES}" = "x" ]; then
echo "SUPPORTED_LOCALES not set"
- echo "You can set it with /etc/sysconfig/i18n file"
+ echo "You can set it in /etc/sysconfig/i18n file"
exit 1
fi
rm -rf ${DESTDIR}${LOCDIR}
install -d ${DESTDIR}${LOCDIR}
+cd ${DESTDIR}${LOCDIR}
if [ "${DESTDIR}" = "" ]; then
DESTDIROPT=
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
echo
done