0
|
1 |
#!/bin/bash
|
|
2 |
#
|
|
3 |
# CDDL HEADER START
|
|
4 |
#
|
|
5 |
# The contents of this file are subject to the terms of the
|
|
6 |
# Common Development and Distribution License (the "License").
|
|
7 |
# You may not use this file except in compliance with the License.
|
|
8 |
#
|
|
9 |
# You can obtain a copy of the license at src/OPENSOLARIS.LICENSE
|
|
10 |
# or http://www.opensolaris.org/os/licensing.
|
|
11 |
# See the License for the specific language governing permissions
|
|
12 |
# and limitations under the License.
|
|
13 |
#
|
|
14 |
# When distributing Covered Code, include this CDDL HEADER in each
|
|
15 |
# file and include the License file at src/OPENSOLARIS.LICENSE.
|
|
16 |
# If applicable, add the following below this CDDL HEADER, with the
|
|
17 |
# fields enclosed by brackets "[]" replaced with your own identifying
|
|
18 |
# information: Portions Copyright [yyyy] [name of copyright owner]
|
|
19 |
#
|
|
20 |
# CDDL HEADER END
|
|
21 |
#
|
|
22 |
# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
|
|
23 |
# Use is subject to license terms.
|
|
24 |
#
|
|
25 |
|
|
26 |
locale=$1
|
|
27 |
|
|
28 |
FILEROOT=$2
|
|
29 |
|
|
30 |
cd $FILEROOT
|
|
31 |
|
|
32 |
PATTERN1=""
|
|
33 |
|
|
34 |
rm -f $locale.tar
|
|
35 |
rm -f $locale.tar.bz2
|
|
36 |
touch $locale.tar
|
|
37 |
echo "tarring up $locale"
|
|
38 |
|
|
39 |
for dir in `find . -name "$locale[._A-Z]*" -type d`
|
|
40 |
do
|
|
41 |
/usr/bin/tar uvf $locale.tar -C $FILEROOT $dir
|
|
42 |
done
|
|
43 |
|
|
44 |
# some legacy locales/new locales have some short names
|
|
45 |
# we have to include as well.
|
|
46 |
|
|
47 |
case $locale in
|
|
48 |
ar_EG)
|
|
49 |
PATTERN1="ar"
|
|
50 |
PATTERN2="";;
|
|
51 |
ca_ES)
|
|
52 |
PATTERN1="ca"
|
|
53 |
PATTERN2="";;
|
|
54 |
cs_CZ)
|
328
|
55 |
PATTERN1="cs"
|
0
|
56 |
PATTERN2="";;
|
|
57 |
de_DE)
|
|
58 |
PATTERN1="de"
|
|
59 |
PATTERN2="de.[A-Z]*";;
|
|
60 |
el_GR)
|
|
61 |
PATTERN1="el"
|
|
62 |
PATTERN2="el.[A-Z]*";;
|
|
63 |
es_ES)
|
|
64 |
PATTERN1="es"
|
|
65 |
PATTERN2="es.[A-Z]*";;
|
|
66 |
fr_FR)
|
|
67 |
PATTERN1="fr"
|
|
68 |
PATTERN2="fr.[A-Z]*";;
|
|
69 |
he_IL)
|
|
70 |
PATTERN1="he"
|
|
71 |
PATTERN2="";;
|
|
72 |
hu_HR)
|
|
73 |
PATTERN1="hu"
|
|
74 |
PATTERN2="";;
|
|
75 |
it_IT)
|
|
76 |
PATTERN1="it"
|
|
77 |
PATTERN2="it.[A-Z]*";;
|
|
78 |
ja_JP)
|
|
79 |
PATTERN1="ja"
|
|
80 |
PATTERN2="";;
|
|
81 |
ko_KR)
|
|
82 |
PATTERN1="ko"
|
|
83 |
PATTERN2="ko.[A-Z]*";;
|
|
84 |
lt_LV)
|
|
85 |
PATTERN1="lt"
|
|
86 |
PATTERN2="";;
|
|
87 |
lv_LV)
|
|
88 |
PATTERN1="lv"
|
|
89 |
PATTERN2="";;
|
|
90 |
pl_PL)
|
|
91 |
PATTERN1="pl"
|
|
92 |
PATTERN2="pl.[A-Z]*";;
|
|
93 |
ru_RU)
|
|
94 |
PATTERN1="ru"
|
|
95 |
PATTERN2="ru.[A-Za-z]*";;
|
|
96 |
sv_SE)
|
|
97 |
PATTERN1="sv"
|
|
98 |
PATTERN2="sv.[A-Z]*";;
|
|
99 |
th_TH)
|
|
100 |
PATTERN1="th"
|
|
101 |
PATTERN2="";;
|
|
102 |
tr_TR)
|
|
103 |
PATTERN1="tr"
|
|
104 |
PATTERN2="";;
|
|
105 |
zh_CN)
|
|
106 |
PATTERN1="zh"
|
|
107 |
PATTERN2="zh.[A-Z]*";;
|
|
108 |
esac
|
|
109 |
|
|
110 |
if [ "$PATTERN1" != "" ]
|
|
111 |
then
|
|
112 |
for dir in `find . -name "$PATTERN1" -type d`
|
|
113 |
do
|
|
114 |
/usr/bin/tar uvf $locale.tar -C $FILEROOT $dir
|
|
115 |
done
|
|
116 |
for dir in `find . -name "$PATTERN2" -type d`
|
|
117 |
do
|
|
118 |
/usr/bin/tar uvf $locale.tar -C $FILEROOT $dir
|
|
119 |
done
|
|
120 |
fi
|
|
121 |
|
|
122 |
bzip2 -9 $locale.tar
|
|
123 |
|
|
124 |
if [ ! -f common.tar.bz2 ]
|
|
125 |
then
|
|
126 |
/usr/bin/tar cvf common.tar -C $FILEROOT usr/openwin/lib/locale/en_US.UTF-8
|
|
127 |
/usr/bin/tar uvf common.tar -C $FILEROOT usr/openwin/lib/locale/compose.dir
|
|
128 |
/usr/bin/tar uvf common.tar -C $FILEROOT usr/openwin/lib/locale/locale.dir
|
|
129 |
/usr/bin/tar uvf common.tar -C $FILEROOT usr/openwin/lib/locale/locale.alias
|
|
130 |
for i in 1 2 4 5 7 8 9 13 15
|
|
131 |
do
|
|
132 |
/usr/bin/tar uvf common.tar -C $FILEROOT usr/openwin/lib/locale/iso_8859_$i
|
|
133 |
done
|
|
134 |
for i in 1 2 5 7 9 13 15
|
|
135 |
do
|
|
136 |
/usr/bin/tar uvf common.tar -C $FILEROOT usr/openwin/lib/locale/iso8859-$i
|
|
137 |
/usr/bin/tar uvf common.tar -C $FILEROOT usr/lib/locale/iso_8859_$i
|
|
138 |
done
|
|
139 |
/usr/bin/tar uvf common.tar -C $FILEROOT usr/lib/locale/common
|
|
140 |
bzip2 -9 common.tar
|
|
141 |
fi
|
|
142 |
|