serial: updates from upstream, added code from old Broadcom SDK for MIPSR1 devices
[tomato.git] / release / image / mklang.sh
blobaa79f44cfb7224543e0ff1b27a314ebdf3175e69
1 #!/bin/sh
2 #set -x
4 MKSQ=../src/linux/linux/scripts/squashfs/mksquashfs
5 TRX=../tools/trx
6 ADDLANG=../tools/addlang
8 LANG="sc sp sw it de fr en"
10 if [ a$1 != a ] ; then
11 LANG=$1
14 rm -rf lang_img
15 mkdir lang_img
17 # Handle original EN language
18 #$MKSQ ../src/router/www/cisco_wrt54g_en oen.sq
19 #$TRX -o oen.trx oen.sq
20 #$ADDLANG -i oen.trx -o lang_img/oen_lang.bin
22 #rm -rf /tmp/www_m
23 #cp -rfa ../src/router/mipsel-uclibc/target/www/ /tmp/www_m
24 #rm -rf /tmp/www_m/lang_pack
25 #rm -rf /tmp/www_m/help
27 # Handle multiple language
28 for lang in $LANG ; do
29 #echo "lang=$lang"
31 if [ ! -d ../src/router/www/lang_pack/${lang}_lang_pack/ ] ; then
32 echo "Cann't find \"$lang\" language package."
33 exit
36 rm -rf /tmp/www_m
37 cp -rfa ../src/router/mipsel-uclibc/target/www/ /tmp/www_m
38 rm -rf /tmp/www_m/lang_pack
39 rm -rf /tmp/www_m/help
41 cp -rfa ../src/router/www/lang_pack/${lang}_lang_pack/ /tmp/www_m/lang_pack
42 cp -rfa ../src/router/www/lang_pack/all_help/${lang}_help /tmp/www_m/help
44 test -d ../src/router/www/lang_pack/${lang}_image/ && cp -rfa ../src/router/www/lang_pack/${lang}_image/*.gif /tmp/www_m/image/
46 $MKSQ /tmp/www_m 2${lang}.sq
47 done
49 for lang in $LANG ; do
50 $TRX -o 2${lang}.trx 2${lang}.sq
51 $ADDLANG -i 2${lang}.trx -o lang_img/${lang}_lang.bin
52 done
54 rm -rf /tmp/www_m
55 rm -f *.trx
56 rm -f *.sq