# HG changeset patch # User Pascal Bellard # Date 1512332213 -3600 # Node ID e4ec52b6fa1138cfd6a8f0ca4ca838bfabb4c40d # Parent 1705daa4b44ab9d3711ca3dd6af4f6c9d2c26d84 mirror: build next floppies diff -r 1705daa4b44a -r e4ec52b6fa11 mirror-tools/slitaz/mirror/floppies/mkfdrolling.sh --- a/mirror-tools/slitaz/mirror/floppies/mkfdrolling.sh Mon Sep 18 20:22:49 2017 +0300 +++ b/mirror-tools/slitaz/mirror/floppies/mkfdrolling.sh Sun Dec 03 21:16:53 2017 +0100 @@ -2,8 +2,10 @@ WD=$(cd $(dirname $0); pwd) while read name iso; do + [ -d $WD/$name ] || continue cd $WD/$name - ISO=../../$iso + ISO=$(ls -t ../../$iso | sed q) + [ -s "$ISO" ] || continue if [ ! -s fd001.img ] || [ $ISO -nt fd001.img ]; then rm -f fd* 2> /dev/null taziso $ISO floppyset > /dev/null @@ -12,24 +14,33 @@ mkdir $mnt mount -o loop,ro $ISO $mnt mtime=$(stat -c %y $mnt/md5sum | cut -f1 -d ' ') - #mtime=$(LC_ALL=C date '+%d %B %Y' -d $mtime) + [ $(date --help 2>&1 | sed '/^BusyB/!d;s/.* v\([^ ]*\).*/\1/;s/\./ /g'\ + | awk '{ printf "%d%02d\n",$1,$2 }') -gt 126 ] && + mtime=$(LC_ALL=C date '+%d %B %Y' -d $mtime) set -- $(sed '/ifmem/!d;s/.*ifmem //' $mnt/boot/isolinux/isolinux.cfg \ | sed 's|^|echo |;s|\([0-9][0-9]*\) |$((\1/1024))M |g' | sh) umount $mnt rmdir $mnt - echo "Built on $mtime, needs up to ${1}b of RAM" > title - n=0; x=1; while [ -n "$x" ]; do n=$(($n+2)); eval x=\$$n; done - n=$((($n - 2) / 2)) - cat > description.html < description.html <This floppy set uses the BIOS instead of the linux driver. You can boot +SliTaz using unsupported floppy drives such as some PCMCIA devices.

+EOT + if [ -z "$1" ]; then + echo "Built on $mtime" > title + else + echo "Built on $mtime, needs up to ${1}b of RAM" > title + n=0; x=1; while [ -n "$x" ]; do n=$(($n+2)); eval x=\$$n; done + n=$((($n - 2) / 2)) + cat >> description.html <You can start with one of the $n following flavors:

    EOT - i=0 - while [ $i -lt $n ]; do - eval flavor=\$$((($n - $i)*2)) - eval ram=\$$((($n - $i)*2 -1)) - cat >> description.html <> description.html <$flavor needs ${ram}B of RAM and $(ls fd* | \ awk "/fd$(($i+1))/{q=1}{if(!q)n++}END{print n}") floppies: fd001.img to $(ls -r fd${i}* | sed q).
    @@ -40,12 +51,13 @@ gtkonly the minimum SliTaz distribution subset with GTK+ support core the default SliTaz distribution EOT - ). + ). EOT - i=$(($i+1)) - done + i=$(($i+1)) + done + echo "
" >> description.html + fi cat >> description.html <

Start your computer with fd001.img. It will show the kernel version string and the kernel cmdline line. You can edit the cmdline. Most users can @@ -54,6 +66,8 @@

The floppy is then loaded into memory (one dot each 64KB) and you will be prompted to insert the next floppy, fd002.img. And so on up to last floppy.

+EOT + [ -n "$1" ] && cat >> description.html <You will be prompted to insert extra floppies for the next flavors. You can bypass this by using B to boot without loading extra floppies.

@@ -64,4 +78,5 @@ done <" text="${dir/-/ }";; *) @@ -83,7 +84,7 @@ echo " >$text" case "$dir" in - *-*) + *-*|next) echo " ";; *) echo "
    " @@ -126,6 +127,7 @@ web*) echo -en "\n · web" ;; mini*) echo -en "\n · mini" ;; loram*) echo -en "\n · loram" ;; + next*) echo -en "\n · next" ;; *) echo -en "$tail
  • SliTaz $dir" ;; esac tail="
  • \n"