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