Fix indentation to make the script more readable
This commit is contained in:
parent
6fdb196500
commit
2906f6cbae
@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
usage ()
|
usage ()
|
||||||
{
|
{
|
||||||
echo "finalize <type>' to package standard localization"
|
echo "finalize <type>' to package standard localization"
|
||||||
echo "type must be one of { monetdef, msgdef, numericdef, timedef, colldef, ctypedef }"
|
echo "type must be one of { monetdef, msgdef, numericdef, timedef, colldef, ctypedef }"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
[ $# -ne 1 ] && usage
|
[ $# -ne 1 ] && usage
|
||||||
@ -38,48 +38,48 @@ grep '^LOCALES+' ${old}/Makefile > ${TEMP}
|
|||||||
|
|
||||||
if [ $1 = "ctypedef" ]
|
if [ $1 = "ctypedef" ]
|
||||||
then
|
then
|
||||||
keep=$(cat ${TEMP} | awk '{ print $2 ".src" }')
|
keep=$(cat ${TEMP} | awk '{ print $2 ".src" }')
|
||||||
(cd ${old} && md5 -r ${keep} | sort) > ${TEMP2}
|
(cd ${old} && md5 -r ${keep} | sort) > ${TEMP2}
|
||||||
keep=$(awk '{ if ($1 != last1) print $2; last1 = $1; }' ${TEMP2})
|
keep=$(awk '{ if ($1 != last1) print $2; last1 = $1; }' ${TEMP2})
|
||||||
for original in ${keep}
|
for original in ${keep}
|
||||||
do
|
do
|
||||||
cp ${old}/${original} ${new}/
|
cp ${old}/${original} ${new}/
|
||||||
done
|
done
|
||||||
awk '{ if ($1 == last1) { print "SYMPAIRS+=\t" last2 " " $2 } \
|
awk '{ if ($1 == last1) { print "SYMPAIRS+=\t" last2 " " $2 } \
|
||||||
else {last1 = $1; last2 = $2}}' ${TEMP2} > ${TEMP3}
|
else {last1 = $1; last2 = $2}}' ${TEMP2} > ${TEMP3}
|
||||||
rm -f ${TEMP2}
|
rm -f ${TEMP2}
|
||||||
/usr/bin/sed -E -e 's/[ ]+/ /g' \
|
/usr/bin/sed -E -e 's/[ ]+/ /g' \
|
||||||
${CLDRDIR}/posix/UTF-8.cm \
|
${CLDRDIR}/posix/UTF-8.cm \
|
||||||
> ${base}/../etc/final-maps/map.UTF-8
|
> ${base}/../etc/final-maps/map.UTF-8
|
||||||
CHARMAPS="ARMSCII-8 Big5 Big5HKSCS CP1131 CP1251 \
|
CHARMAPS="ARMSCII-8 Big5 Big5HKSCS CP1131 CP1251 \
|
||||||
CP866 GB2312 GBK ISCII-DEV ISO8859-1 \
|
CP866 GB2312 GBK ISCII-DEV ISO8859-1 \
|
||||||
ISO8859-13 ISO8859-15 ISO8859-2 ISO8859-4 \
|
ISO8859-13 ISO8859-15 ISO8859-2 ISO8859-4 \
|
||||||
ISO8859-5 ISO8859-7 ISO8859-9 KOI8-R KOI8-U \
|
ISO8859-5 ISO8859-7 ISO8859-9 KOI8-R KOI8-U \
|
||||||
PT154 SJIS US-ASCII eucCN eucJP eucKR"
|
PT154 SJIS US-ASCII eucCN eucJP eucKR"
|
||||||
|
|
||||||
# GB18030 blows up, use pre-generate Illumos version
|
# GB18030 blows up, use pre-generate Illumos version
|
||||||
|
|
||||||
for map in ${CHARMAPS}
|
for map in ${CHARMAPS}
|
||||||
do
|
do
|
||||||
encoding=${map}
|
encoding=${map}
|
||||||
if [ ${map} = "Big5HKSCS" ]
|
if [ ${map} = "Big5HKSCS" ]
|
||||||
then
|
then
|
||||||
encoding="Big5"
|
encoding="Big5"
|
||||||
fi
|
fi
|
||||||
/usr/local/bin/perl ${base}/convert_map.pl \
|
/usr/local/bin/perl ${base}/convert_map.pl \
|
||||||
${base}/../etc/charmaps/${map}.TXT ${encoding} \
|
${base}/../etc/charmaps/${map}.TXT ${encoding} \
|
||||||
| /usr/bin/sed -E -e 's/ +/ /g' \
|
| /usr/bin/sed -E -e 's/ +/ /g' \
|
||||||
> ${base}/../etc/final-maps/map.${map}
|
> ${base}/../etc/final-maps/map.${map}
|
||||||
echo map ${map} converted.
|
echo map ${map} converted.
|
||||||
done
|
done
|
||||||
|
|
||||||
else # below is everything but ctypedef
|
else # below is everything but ctypedef
|
||||||
|
|
||||||
keep=$(cat ${TEMP} | awk '{ print $2 }')
|
keep=$(cat ${TEMP} | awk '{ print $2 }')
|
||||||
for original in ${keep}
|
for original in ${keep}
|
||||||
do
|
do
|
||||||
cp ${old}/${original}.src ${new}/
|
cp ${old}/${original}.src ${new}/
|
||||||
done
|
done
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user