slitaz-forge diff mirror/floppies/mkfdrolling.sh @ rev 625

Update mirror/floppies
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jul 16 16:00:22 2016 +0200 (2016-07-16)
parents
children 67852828c7ab
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/mirror/floppies/mkfdrolling.sh	Sat Jul 16 16:00:22 2016 +0200
     1.3 @@ -0,0 +1,60 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +cd $(dirname $0)/rolling
     1.7 +ISO=../../iso/rolling/slitaz-rolling.iso
     1.8 +if [ ! -s fd001.img ] || [ $ISO -nt fd001.img ]; then
     1.9 +	rm -f fd* 2> /dev/null
    1.10 +	taziso $ISO floppyset > /dev/null
    1.11 +	md5sum fd* > md5sum
    1.12 +	mnt=/mnt$$
    1.13 +	mkdir $mnt
    1.14 +	mount -o loop,ro $ISO $mnt
    1.15 +	mtime=$(stat -c %y $mnt/md5sum | sed 's/ .*//')
    1.16 +	set -- $(sed '/ifmem/!d;s/.*ifmem //' $mnt/boot/isolinux/isolinux.cfg)
    1.17 +	umount $mnt
    1.18 +	rmdir $mnt
    1.19 +	echo "Built on $mtime, needs up to ${1}b of RAM" > title
    1.20 +	n=0; x=1; while [ -n "$x" ]; do n=$(($n+2)); eval x=\$$n; done
    1.21 +	n=$((($n - 2) / 2))
    1.22 +	cat > description.html <<EOT
    1.23 +<p>You can start with one of the $n following flavors:</p>
    1.24 +
    1.25 +<ul>
    1.26 +EOT
    1.27 +	i=0
    1.28 +	while [ $i -lt $n ]; do
    1.29 +		eval flavor=\$$((($n - $i)*2))
    1.30 +		eval ram=\$$((($n - $i)*2 -1))
    1.31 +		cat >> description.html <<EOT
    1.32 +	<li><b>$flavor</b> needs ${ram}B of RAM and $(ls fd* | \
    1.33 +		awk "/fd$(($i+1))/{q=1}{if(!q)n++}END{print n}") floppies:
    1.34 +		<tt>fd001.img</tt> to <tt>$(ls -r fd${i}* | sed q)</tt>.<br>
    1.35 +		$flavor provides $(while read f d; do 
    1.36 +			[ $f == $flavor ] && echo $d; done <<EOT
    1.37 +base the minimum SliTaz distribution subset in text mode
    1.38 +justx the minimum SliTaz distribution subset with X11 support
    1.39 +gtkonly the minimum SliTaz distribution subset with GTK+ support
    1.40 +core the default SliTaz distribution
    1.41 +EOT
    1.42 +		).</li>
    1.43 +EOT
    1.44 +		i=$(($i+1))
    1.45 +	done
    1.46 +	cat >> description.html <<EOT
    1.47 +</ul>
    1.48 +
    1.49 +<p>Start your computer with <tt>fd001.img</tt>. It will show the kernel version
    1.50 +string and the kernel cmdline line. You can edit the cmdline. Most users can
    1.51 +just press Enter.</p>
    1.52 +
    1.53 +<p>The floppy is then loaded into memory (one dot each 64KB) and you will be
    1.54 +prompted to insert the next floppy, <tt>fd002.img</tt>. And so on up to last
    1.55 +floppy.</p>
    1.56 +
    1.57 +<p>You will be prompted to insert extra floppies for the next flavors.
    1.58 +You can bypass this by using B to boot without loading extra floppies.</p>
    1.59 +EOT
    1.60 +	cd ..
    1.61 +	./mkindex.sh rolling > index-rolling.html
    1.62 +fi
    1.63 +