wok-4.x view mirror-tools/stuff/var/www/slitaz/mirror/pxe/mkcfg.sh @ rev 2654

Add: hal-info
author Dominique Corbex <domcox@users.sourceforge.net>
date Sat Apr 18 17:38:03 2009 +0200 (2009-04-18)
parents 575d6048b91a
children 7b9e6fc9fc3d
line source
1 #!/bin/sh
3 cd $(dirname $0)
5 # Status functions.
6 status()
7 {
8 local CHECK=$?
9 echo -en "\\033[70G[ "
10 if [ $CHECK = 0 ]; then
11 echo -en "\\033[1;33mOK"
12 else
13 echo -en "\\033[1;31mFailed"
14 fi
15 echo -e "\\033[0;39m ]"
16 }
18 for version in cooking $(ls ../boot | grep 0$) ; do
20 [ "$version" = "1.0" ] && continue
21 echo -n "Building $version"
22 if ! grep -q $version/splash.lss $version/isolinux.msg ; then
23 echo "WARNING: please update $version/isolinux.msg with $version/splash.lss"
24 fi
25 rm -f $version/*-*.cfg
26 ( cd ../boot/$version ; ls rootfs-*.gz 2> /dev/null ) | \
27 sed 's/rootfs-\(.*\).gz/\1/' | while read flavor; do
28 lowcased=$(echo $flavor | tr [A-Z] [a-z])
29 if [ "$lowcased" != "$flavor" ]; then
30 echo ""
31 echo "Warning : renaming ../boot/$version/rootfs-$flavor.gz to ../boot/$version/rootfs-$lowcased.gz"
32 mv ../boot/$version/rootfs-$flavor.gz ../boot/$version/rootfs-$lowcased.gz
33 flavor=$lowcased
34 fi
35 [ -f $version/$flavor.cfg ] && continue
36 cp $version/core.cfg $version/$flavor.cfg
37 sed -i -e "s/core-common/$flavor-common/" \
38 -e "s/rootfs.gz/rootfs-$flavor.gz/" $version/$flavor.cfg
39 done
40 for flavor in $(cd $version ; ls *.cfg | sed 's/.cfg//') ; do
41 echo -n " $flavor"
42 cat > $version/$flavor-common.cfg <<EOT
43 default slitaz
44 label deCH
45 config $version/$flavor-de_CH.cfg
46 label frCH
47 config $version/$flavor-fr_CH.cfg
48 label reboot
49 com32 reboot.c32
51 implicit 0
52 prompt 1
53 timeout 80
54 F1 $version/help.txt
55 F2 $version/options.txt
56 F3 $version/isolinux.msg
57 F4 $version/display.txt
58 F5 $version/enhelp.txt
59 F6 $version/enopts.txt
61 EOT
62 while read cfg kbd loc ; do
63 if [ ! -f $version/$cfg.kbd ]; then
64 echo ""
65 echo "Not found: $version/$cfg.kbd"
66 fi
67 info="Now using $kbd keyboard and $loc locale."
68 sed -e "s/^display/kbdmap $version\/$cfg.kbd\ndisplay/" \
69 -e "s/^label slitaz$/say $info\nlabel slitaz/" \
70 -e "s/gz/gz lang=$loc kmap=$kbd/" \
71 < $version/$flavor.cfg > $version/$flavor-$cfg.cfg
72 cat >> $version/$flavor-common.cfg <<EOT
73 label $cfg
74 config $version/$flavor-$cfg.cfg
75 EOT
76 done <<EOT
77 be be-latin1 fr_FR
78 br br-abnt2 pt_PT
79 ca cf fr_FR
80 de de-latin1 de_DE
81 de_CH de_CH-latin1 de_DE
82 en uk C
83 es es es_ES
84 fi fi-latin1 fi
85 fr fr-latin1 fr_FR
86 fr_CH fr_CH-latin1 fr_FR
87 hu hu hu
88 it it it_IT
89 jp jp106 jp_JP
90 pt pt-latin1 pt_PT
91 ru ru ru_RU
92 us us C
93 EOT
94 done
95 status
97 done
99 echo -n "Building 1.0"
100 rm -f 1.0/*-*.cfg
101 ( cd ../boot/1.0 ; ls rootfs-*.gz 2> /dev/null ) | \
102 sed 's/rootfs-\(.*\).gz/\1/' | while read flavor; do
103 [ -f 1.0/$flavor.cfg ] && continue
104 cp 1.0/core.cfg 1.0/$flavor.cfg
105 sed -i -e "s/core-common/$flavor-common/" \
106 -e "s/rootfs.gz/rootfs-$flavor.gz/" 1.0/$flavor.cfg
107 done
108 for flavor in $(cd 1.0; ls *.cfg | sed 's/.cfg//') ; do
109 echo -n " $flavor"
110 cat > 1.0/$flavor-common.cfg <<EOT
111 default slitaz
113 label def
114 config 1.0/$flavor.cfg
116 label reboot
117 com32 reboot.c32
119 implicit 0
120 prompt 1
121 timeout 80
122 F1 1.0/help.txt
123 F2 1.0/options.txt
124 F3 1.0/isolinux.msg
125 F4 1.0/display.txt
126 EOT
127 while read cfg kbd loc ; do
128 if [ ! -f 1.0/$cfg.kbd ]; then
129 echo ""
130 echo "Not found: 1.0/$cfg.kbd"
131 fi
132 sed -e "s/^display/KBDMAP 1.0\/$cfg.kbd\ndisplay/" \
133 -e "s/gz/gz lang=$loc kmap=$kbd/" \
134 < 1.0/$flavor.cfg > 1.0/$flavor-$cfg.cfg
135 cat >> 1.0/$flavor-common.cfg <<EOT
136 label $cfg
137 config 1.0/$flavor-$cfg.cfg
138 EOT
139 done <<EOT
140 be be fr
141 ca ca fr
142 de_CH fr_CH fr_CH
143 en en en
144 es es en
145 fr fr fr
146 fr_CH fr_CH fr_CH
147 it it en
148 us us en
149 EOT
150 done
151 status