summaryrefslogtreecommitdiff
path: root/libc/debian/generate-locales-all
blob: a5ed1105b72b621c79253e0f80903c6325be588d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh

set -e
set -u

LOCALES_PKG=debian/locales
LOCALES_ALL_PKG=debian/locales-all
LOCALES=/usr/share/i18n/locales
LOCALEDEF=${LOCALEDEF-debian/libc-bin/usr/bin/localedef}

LOCALES_LIST=`awk '{print $1}' debian/SUPPORTED`

set -x
mkdir -p $LOCALES_ALL_PKG/usr/lib/locale
while read -r line; do
    set -- $line
    echo "Generating $1 / $2 ..."
    (cat $LOCALES_PKG/$LOCALES/$1.src && gunzip -c $LOCALES_PKG/usr/share/i18n/LC_DATA.gz) | \
    	$LOCALEDEF -f $LOCALES_PKG/$LOCALES/$2.cm \
        $LOCALES_ALL_PKG/usr/lib/locale/$1
done < debian/SUPPORTED

exit 0