slitaz-forge diff mirror/floppies/mkindex.sh @ rev 716
mirror/floppies: multi-format support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Jul 23 16:41:12 2021 +0000 (2021-07-23) |
parents | 2f42ab2912be |
children |
line diff
1.1 --- a/mirror/floppies/mkindex.sh Sun Jun 24 21:59:25 2018 +0200 1.2 +++ b/mirror/floppies/mkindex.sh Fri Jul 23 16:41:12 2021 +0000 1.3 @@ -12,6 +12,7 @@ 1.4 1.5 build_page() { 1.6 DIR=$1 1.7 + SETS="$(echo $(./sets.sh $1))" 1.8 case "$DIR" in 1.9 *.*) stable=stable;; 1.10 *) stable=development;; 1.11 @@ -138,11 +139,12 @@ 1.12 1.13 <!-- Navigation --> 1.14 <nav> 1.15 - <header>1.44MB SliTaz$TYPE $VERSION floppy images</header> 1.16 - <div class="large"><table> 1.17 + <header><span id="format">1.44MB</span> SliTaz$TYPE $VERSION floppy images</header> 1.18 + 1.19 + <div class="large"><table id="floppies"> 1.20 $( 1.21 n=0 1.22 -for f in $DIR/fd*img ; do 1.23 +for f in $DIR/fd???.img ; do 1.24 [ $n -eq 0 ] && echo " <tr>" 1.25 echo " <td><a href=\"$f\">$(basename $f .img)</a></td>" 1.26 n=$(( ($n+1)%6 )) 1.27 @@ -160,6 +162,16 @@ 1.28 </nav> 1.29 </div></div> 1.30 1.31 +EOT 1.32 + [ -n "$SETS" ] && cat <<EOT 1.33 +<script type="text/javascript"> 1.34 +var dir = "$VERSION"; 1.35 +var sets = [${SETS// /,}]; 1.36 +//--> 1.37 +</script> 1.38 +<script type="text/javascript" src="format.js"></script> 1.39 +EOT 1.40 + cat <<EOT 1.41 1.42 <!-- Content --> 1.43 <main>