summaryrefslogtreecommitdiffstats
path: root/perl-install/share/gen_locales.sh
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/share/gen_locales.sh')
-rwxr-xr-xperl-install/share/gen_locales.sh21
1 files changed, 14 insertions, 7 deletions
diff --git a/perl-install/share/gen_locales.sh b/perl-install/share/gen_locales.sh
index 249db5c1a..afd6298c6 100755
--- a/perl-install/share/gen_locales.sh
+++ b/perl-install/share/gen_locales.sh
@@ -4,15 +4,16 @@ rm -rf .tmp ; mkdir .tmp ; cd .tmp
tar xfj ../locales-skeleton.tar.bz2
# locale utf-8
-for i in LC_ADDRESS LC_COLLATE LC_IDENTIFICATION LC_MEASUREMENT LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_MESSAGES/SYS_LC_MESSAGES ; do
- cp -f /usr/share/locale/UTF-8/$i usr/share/locale/UTF-8/$i
+for i in LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_MESSAGES/SYS_LC_MESSAGES ; do
+ install -D -m 644 /usr/share/locale/UTF-8/$i usr/share/locale/UTF-8/$i
done
# lc_ctype for common encoding
-for i in CP1251 ISO-8859-13 ISO-8859-14 ISO-8859-15 ISO-8859-2 ISO-8859-3 ISO-8859-7 ISO-8859-9 ISO-8859-9E ; do
+for i in CP1251 ISO-8859-13 ISO-8859-14 ISO-8859-15 ISO-8859-2 ISO-8859-3 ISO-8859-7 ISO-8859-9 ; do
f=usr/share/locale/$i/LC_CTYPE
[ -e /$f ] || { echo missing /$f ; exit 1 ; }
- cp -f /$f $f
+ install -D -m 644 /$f $f
+ (cd usr/share/locale/$i ; ln -s ../UTF-8/* . 2>/dev/null)
done
rm -rf .tmp2 ; mkdir .tmp2 ; cd .tmp2
@@ -21,7 +22,8 @@ for i in hy ja ko th vi ; do
rpm2cpio /RPMS/$ii-*.rpm | cpio -id --quiet
f=usr/share/locale/$i/LC_CTYPE
[ -e $f ] || { echo missing $f in package $ii ; exit 1 ; }
- cp -f $f ../$f
+ install -D -m 644 $f ../$f
+ (cd ../usr/share/locale/$i ; ln -s ../UTF-8/* . 2>/dev/null)
rm -rf *
done
cd .. ; rm -rf .tmp2
@@ -34,13 +36,18 @@ for i in zh_CN.GB2312 zh_TW.Big5 ; do
for f in LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION LC_MEASUREMENT LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER LC_TELEPHONE LC_TIME LC_MESSAGES/SYS_LC_MESSAGES ; do
f=usr/share/locale/$i/$f
[ -e $f ] || { echo missing $f in package $ii ; exit 1 ; }
- cp -f $f ../$f
+ install -D -m 644 $f ../$f
done
rm -rf *
done
cd .. ; rm -rf .tmp2
-for i in common C armscii-8 en_US.UTF-8 iso8859-1 iso8859-13 iso8859-14 iso8859-15 iso8859-2 iso8859-3 iso8859-5 iso8859-7 iso8859-9 iso8859-9e ja ko koi8-r koi8-u microsoft-cp1251 microsoft-cp1255 microsoft-cp1256 th_TH vi_VN.tcvn zh_CN zh_TW.big5 ; do
+(cd usr/share/locale ; mv zh_CN.GB2312 GB2312 ; mv zh_TW.Big5 BIG5)
+
+perl -I../.. ../gen_locales.pl || exit 1
+
+
+for i in common C armscii-8 en_US.UTF-8 iso8859-1 iso8859-13 iso8859-14 iso8859-15 iso8859-2 iso8859-3 iso8859-5 iso8859-7 iso8859-9 iso8859-9e ja ko koi8-r koi8-u microsoft-cp1251 microsoft-cp1255 microsoft-cp1256 th_TH vi_VN.tcvn zh_CN zh_TW.big5 ; do
cp -a /usr/X11R6/lib/X11/locale/$i usr/X11R6/lib/X11/locale
done