blob: 95ce1b02c06e5e212eb587cfaf755fdd552765c5 (
plain) (
blame)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#!/bin/sh
# installation script for Wnn4.2
if [ X"$2" != X"POST-INSTALL" ]; then
exit 0
fi
case $1 in
jp-Wnn-4.2)
sys_dirs="${PKG_PREFIX}/lib/wnn/ja_JP/dic/pubdic ${PKG_PREFIX}/lib/wnn/ja_JP/dic/wnncons"
usr_dirs=${PKG_PREFIX}/lib/wnn/ja_JP/dic/usr
wnntouch=${PKG_PREFIX}/bin/Wnn4/wnntouch
wnnserver=${PKG_PREFIX}/bin/Wnn4/jserver
wnnname=Wnn
;;
cn-Wnn-4.2)
sys_dirs="${PKG_PREFIX}/lib/wnn/zh_CN/dic/sys ${PKG_PREFIX}/lib/wnn/zh_TW/dic/sys"
usr_dirs="${PKG_PREFIX}/lib/wnn/zh_CN/dic/usr ${PKG_PREFIX}/lib/wnn/zh_TW/dic/usr"
wnntouch=${PKG_PREFIX}/bin/cWnn4/cwnntouch
wnnserver=${PKG_PREFIX}/bin/cWnn4/cserver
wnnname=cWnn
;;
kr-Wnn-4.2)
sys_dirs="${PKG_PREFIX}/lib/wnn/ko_KR/dic/sys"
usr_dirs=${PKG_PREFIX}/lib/wnn/ko_KR/dic/usr
wnntouch=${PKG_PREFIX}/bin/kWnn4/kwnntouch
wnnserver=${PKG_PREFIX}/bin/kWnn4/kserver
wnnname=kWnn
;;
esac
for dir in $sys_dirs; do
$wnntouch $dir/*
done
for dir in $usr_dirs; do
if [ ! -d $dir ]; then
mkdir -p $dir
fi
chown wnn $dir
done
startup_script=${PKG_PREFIX}/etc/rc.d/${wnnname}.sh
if [ ! -f ${startup_script} ]; then
echo "Installing ${startup_script} startup file.";
echo '#!/bin/sh' > ${startup_script};
echo "wnn=${wnnserver}" >> ${startup_script};
echo 'if [ -f $wnn ]; then' >> ${startup_script};
echo " echo -n ' ${wnnname}'" >> ${startup_script};
echo ' $wnn' >> ${startup_script};
echo "fi" >> ${startup_script};
chmod 755 ${startup_script};
chown bin.bin ${startup_script};
fi
|