slitaz-dev-tools 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 1705daa4b44a
children 930eba358f72
files mirror-tools/slitaz/mirror/floppies/mkfdrolling.sh mirror-tools/slitaz/mirror/floppies/mkindex.sh
line diff
     1.1 --- a/mirror-tools/slitaz/mirror/floppies/mkfdrolling.sh	Mon Sep 18 20:22:49 2017 +0300
     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
     2.1 --- a/mirror-tools/slitaz/mirror/floppies/mkindex.sh	Mon Sep 18 20:22:49 2017 +0300
     2.2 +++ b/mirror-tools/slitaz/mirror/floppies/mkindex.sh	Sun Dec 03 21:16:53 2017 +0100
     2.3 @@ -1,7 +1,7 @@
     2.4  #!/bin/sh
     2.5  
     2.6  list_version() {
     2.7 -	ls rolling ?.0 -dr | \
     2.8 +	ls rolling next ?.0 -dr | \
     2.9  	while read dir; do
    2.10  		echo $dir
    2.11  		[ -d loram-$dir ] && echo loram-$dir
    2.12 @@ -21,6 +21,7 @@
    2.13  		web*)	TYPE="&nbsp;web" ;;
    2.14  		mini*)	TYPE="&nbsp;mini" ;;
    2.15  		loram*)	TYPE="&nbsp;loram" ;;
    2.16 +		next*)	TYPE="&nbsp;next" ;;
    2.17  		*)	TYPE=""
    2.18  	esac
    2.19  	TITLE="Floppy image set"
    2.20 @@ -70,7 +71,7 @@
    2.21  list_version | \
    2.22  while read dir; do
    2.23  	case "$dir" in
    2.24 -	*-*)
    2.25 +	*-*|next)
    2.26  		echo -n "					<li>"
    2.27  		text="${dir/-/ }";;
    2.28  	*)
    2.29 @@ -83,7 +84,7 @@
    2.30  	echo "						>$text</a>"
    2.31  
    2.32  	case "$dir" in
    2.33 -	*-*)
    2.34 +	*-*|next)
    2.35  		echo "					</li>";;
    2.36  	*)
    2.37  		echo "						<ul>"
    2.38 @@ -126,6 +127,7 @@
    2.39  	web*)	echo -en "\n				&middot; <a href=\"index-$dir.html\">web</a>" ;;
    2.40  	mini*)	echo -en "\n				&middot; <a href=\"index-$dir.html\">mini</a>" ;;
    2.41  	loram*)	echo -en "\n				&middot; <a href=\"index-$dir.html\">loram</a>" ;;
    2.42 +	next*)	echo -en "\n				&middot; <a href=\"index-$dir.html\">next</a>" ;;
    2.43  	*)   	echo -en "$tail			<li><a href=\"index-$dir.html\">SliTaz $dir</a>" ;;
    2.44  	esac
    2.45  	tail="</li>\n"