blob: 47e7e82c358106facfce741baf85576d33c148a3 (
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
25
26
27
28
29
|
#! /bin/sh --
dirs="/usr/local/lib/nls /usr/lib/nls /usr/local/share/nls /usr/share/nls"
dirs="$dirs /usr/local/lib/i18n /usr/lib/i18n /usr/local/share/i18n"
dirs="$dirs /usr/share/i18n"
trap "rm -f ./charsets.$$ charsets.list.$$ charsets.alias.$$ ; exit" 0 1 2 15
rm -f ./charsets.$$
for i in charsets.list charsets.alias ; do
mv -f $i $i.$$
done
for d in $dirs ; do
[ -d $d/charmaps ] && ./parse_i18n ./ $d/charmaps/* >> ./charsets.$$
done
if test -s ./charsets.$$ ; then
awk '$1 == "charset" { printf ("%s\n", $2); }' ./charsets.$$ > charsets.list
awk '$1 == "alias" { printf ("%s %s\n", $2, $3); }' ./charsets.$$ > charsets.alias
fi
if test -s charsets.list ; then
:
else
mv charsets.alias.$$ charsets.alias ;
mv charsets.list.$$ charsets.list ;
fi
|