slitaz-dev-tools view mirror-tools/slitaz/mirror/floppies/mkfdrolling.sh @ rev 302

Update floppies
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Sep 01 17:28:05 2017 +0200 (2017-09-01)
parents
children e4ec52b6fa11
line source
1 #!/bin/sh
3 WD=$(cd $(dirname $0); pwd)
4 while read name iso; do
5 cd $WD/$name
6 ISO=../../$iso
7 if [ ! -s fd001.img ] || [ $ISO -nt fd001.img ]; then
8 rm -f fd* 2> /dev/null
9 taziso $ISO floppyset > /dev/null
10 md5sum fd* > md5sum
11 mnt=/mnt$$
12 mkdir $mnt
13 mount -o loop,ro $ISO $mnt
14 mtime=$(stat -c %y $mnt/md5sum | cut -f1 -d ' ')
15 #mtime=$(LC_ALL=C date '+%d %B %Y' -d $mtime)
16 set -- $(sed '/ifmem/!d;s/.*ifmem //' $mnt/boot/isolinux/isolinux.cfg \
17 | sed 's|^|echo |;s|\([0-9][0-9]*\) |$((\1/1024))M |g' | sh)
18 umount $mnt
19 rmdir $mnt
20 echo "Built on $mtime, needs up to ${1}b of RAM" > title
21 n=0; x=1; while [ -n "$x" ]; do n=$(($n+2)); eval x=\$$n; done
22 n=$((($n - 2) / 2))
23 cat > description.html <<EOT
24 <p>You can start with one of the $n following flavors:</p>
26 <ul>
27 EOT
28 i=0
29 while [ $i -lt $n ]; do
30 eval flavor=\$$((($n - $i)*2))
31 eval ram=\$$((($n - $i)*2 -1))
32 cat >> description.html <<EOT
33 <li><b>$flavor</b> needs ${ram}B of RAM and $(ls fd* | \
34 awk "/fd$(($i+1))/{q=1}{if(!q)n++}END{print n}") floppies:
35 <tt>fd001.img</tt> to <tt>$(ls -r fd${i}* | sed q)</tt>.<br>
36 $flavor provides $(while read f d; do
37 [ $f == $flavor ] && echo $d; done <<EOT
38 base the minimum SliTaz distribution subset in text mode
39 justx the minimum SliTaz distribution subset with X11 support
40 gtkonly the minimum SliTaz distribution subset with GTK+ support
41 core the default SliTaz distribution
42 EOT
43 ).</li>
44 EOT
45 i=$(($i+1))
46 done
47 cat >> description.html <<EOT
48 </ul>
50 <p>Start your computer with <tt>fd001.img</tt>. It will show the kernel version
51 string and the kernel cmdline line. You can edit the cmdline. Most users can
52 just press Enter.</p>
54 <p>The floppy is then loaded into memory (one dot each 64KB) and you will be
55 prompted to insert the next floppy, <tt>fd002.img</tt>. And so on up to last
56 floppy.</p>
58 <p>You will be prompted to insert extra floppies for the next flavors.
59 You can bypass this by using B to boot without loading extra floppies.</p>
60 EOT
61 cd ..
62 ./mkindex.sh $name > index-$name.html
63 fi
64 done <<EOT
65 rolling iso/rolling/slitaz-rolling.iso
66 loram-rolling iso/rolling/slitaz-rolling-loram.iso
67 EOT