slitaz-dev-tools diff mirror-tools/slitaz/mirror/floppies/mkfdrolling.sh @ rev 307

mirror: build next floppies
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Dec 03 21:16:53 2017 +0100 (2017-12-03)
parents 1c207a9e6d0c
children a6b28f1e53eb
line diff
     1.1 --- a/mirror-tools/slitaz/mirror/floppies/mkfdrolling.sh	Fri Sep 01 17:28:05 2017 +0200
     1.2 +++ b/mirror-tools/slitaz/mirror/floppies/mkfdrolling.sh	Sun Dec 03 21:16:53 2017 +0100
     1.3 @@ -2,8 +2,10 @@
     1.4  
     1.5  WD=$(cd $(dirname $0); pwd)
     1.6  while read name iso; do
     1.7 +    [ -d $WD/$name ] || continue
     1.8      cd $WD/$name
     1.9 -    ISO=../../$iso
    1.10 +    ISO=$(ls -t ../../$iso | sed q)
    1.11 +    [ -s "$ISO" ] || continue
    1.12      if [ ! -s fd001.img ] || [ $ISO -nt fd001.img ]; then
    1.13  	rm -f fd* 2> /dev/null
    1.14  	taziso $ISO floppyset > /dev/null
    1.15 @@ -12,24 +14,33 @@
    1.16  	mkdir $mnt
    1.17  	mount -o loop,ro $ISO $mnt
    1.18  	mtime=$(stat -c %y $mnt/md5sum | cut -f1 -d ' ')
    1.19 -	#mtime=$(LC_ALL=C date '+%d %B %Y' -d $mtime)
    1.20 +	[ $(date --help 2>&1 | sed '/^BusyB/!d;s/.* v\([^ ]*\).*/\1/;s/\./ /g'\
    1.21 +		 | awk '{ printf "%d%02d\n",$1,$2 }') -gt 126 ] &&
    1.22 +		mtime=$(LC_ALL=C date '+%d %B %Y' -d $mtime)
    1.23  	set -- $(sed '/ifmem/!d;s/.*ifmem //' $mnt/boot/isolinux/isolinux.cfg \
    1.24  		| sed 's|^|echo |;s|\([0-9][0-9]*\) |$((\1/1024))M |g' | sh)
    1.25  	umount $mnt
    1.26  	rmdir $mnt
    1.27 -	echo "Built on $mtime, needs up to ${1}b of RAM" > title
    1.28 -	n=0; x=1; while [ -n "$x" ]; do n=$(($n+2)); eval x=\$$n; done
    1.29 -	n=$((($n - 2) / 2))
    1.30 -	cat > description.html <<EOT
    1.31 +		cat > description.html <<EOT
    1.32 +<p>This floppy set uses the BIOS instead of the linux driver. You can boot
    1.33 +SliTaz using unsupported floppy drives such as some PCMCIA devices.</p>
    1.34 +EOT
    1.35 +	if [ -z "$1" ]; then
    1.36 +		echo "Built on $mtime" > title
    1.37 +	else
    1.38 +		echo "Built on $mtime, needs up to ${1}b of RAM" > title
    1.39 +		n=0; x=1; while [ -n "$x" ]; do n=$(($n+2)); eval x=\$$n; done
    1.40 +		n=$((($n - 2) / 2))
    1.41 +		cat >> description.html <<EOT
    1.42  <p>You can start with one of the $n following flavors:</p>
    1.43  
    1.44  <ul>
    1.45  EOT
    1.46 -	i=0
    1.47 -	while [ $i -lt $n ]; do
    1.48 -		eval flavor=\$$((($n - $i)*2))
    1.49 -		eval ram=\$$((($n - $i)*2 -1))
    1.50 -		cat >> description.html <<EOT
    1.51 +		i=0
    1.52 +		while [ $i -lt $n ]; do
    1.53 +			eval flavor=\$$((($n - $i)*2))
    1.54 +			eval ram=\$$((($n - $i)*2 -1))
    1.55 +			cat >> description.html <<EOT
    1.56  	<li><b>$flavor</b> needs ${ram}B of RAM and $(ls fd* | \
    1.57  		awk "/fd$(($i+1))/{q=1}{if(!q)n++}END{print n}") floppies:
    1.58  		<tt>fd001.img</tt> to <tt>$(ls -r fd${i}* | sed q)</tt>.<br>
    1.59 @@ -40,12 +51,13 @@
    1.60  gtkonly the minimum SliTaz distribution subset with GTK+ support
    1.61  core the default SliTaz distribution
    1.62  EOT
    1.63 -		).</li>
    1.64 +	).</li>
    1.65  EOT
    1.66 -		i=$(($i+1))
    1.67 -	done
    1.68 +			i=$(($i+1))
    1.69 +		done
    1.70 +		echo "</ul>" >> description.html
    1.71 +	fi
    1.72  	cat >> description.html <<EOT
    1.73 -</ul>
    1.74  
    1.75  <p>Start your computer with <tt>fd001.img</tt>. It will show the kernel version
    1.76  string and the kernel cmdline line. You can edit the cmdline. Most users can
    1.77 @@ -54,6 +66,8 @@
    1.78  <p>The floppy is then loaded into memory (one dot each 64KB) and you will be
    1.79  prompted to insert the next floppy, <tt>fd002.img</tt>. And so on up to last
    1.80  floppy.</p>
    1.81 +EOT
    1.82 +	[ -n "$1" ] && cat >> description.html <<EOT
    1.83  
    1.84  <p>You will be prompted to insert extra floppies for the next flavors.
    1.85  You can bypass this by using B to boot without loading extra floppies.</p>
    1.86 @@ -64,4 +78,5 @@
    1.87  done <<EOT
    1.88  rolling		iso/rolling/slitaz-rolling.iso
    1.89  loram-rolling	iso/rolling/slitaz-rolling-loram.iso
    1.90 +next		iso/next/slitaz-next-*.iso
    1.91  EOT