slitaz-dev-tools view mirror-tools/slitaz/mirror/floppies/mkindex.sh @ rev 305

mirror/floppies: ascii only for switch.ch
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Sep 03 18:03:50 2017 +0200 (2017-09-03)
parents 0870c20833ef
children e4ec52b6fa11
line source
1 #!/bin/sh
3 list_version() {
4 ls rolling ?.0 -dr | \
5 while read dir; do
6 echo $dir
7 [ -d loram-$dir ] && echo loram-$dir
8 [ -d web-$dir ] && echo web-$dir
9 [ -d mini-$dir ] && echo mini-$dir
10 done
11 }
13 build_page() {
14 DIR=$1
15 case "$DIR" in
16 *.*) stable=stable;;
17 *) stable=development;;
18 esac
19 VERSION=${DIR#*-}
20 case "$DIR" in
21 web*) TYPE="&nbsp;web" ;;
22 mini*) TYPE="&nbsp;mini" ;;
23 loram*) TYPE="&nbsp;loram" ;;
24 *) TYPE=""
25 esac
26 TITLE="Floppy image set"
27 [ -s $DIR/title ] && TITLE="$(cat $DIR/title)"
28 cat <<EOT
29 <!DOCTYPE html>
30 <html lang="en">
31 <head>
32 <title>SliTaz Boot Floppies</title>
33 <meta charset="UTF-8">
34 <meta name="description" content="slitaz$TYPE boot floppies $VERSION">
35 <meta name="robots" content="index, nofollow">
36 <meta name="author" content="SliTaz Contributors">
37 <meta name="viewport" content="width=device-width, initial-scale=1.0">
38 <link rel="shortcut icon" href="static/favicon.ico">
39 <link rel="stylesheet" href="static/slitaz.min.css">
40 <link rel="stylesheet" href="menu.css">
41 <style type="text/css">
42 .block_info { width: inherit; }
43 nav table { margin: 6px 0 0 0; }
44 nav table a { color: #215090; }
45 nav header::before { content: url(pics/floppy.png); vertical-align: middle; padding: 0 6px 0 0; }
46 pre, tt, code { font-size: 0.9rem; }
47 </style>
48 </head>
49 <body>
51 <script>de=document.documentElement;de.className+=(("ontouchstart" in de)?' touch':' no-touch');</script>
53 <header>
54 <h1 id="top"><a href="http://www.slitaz.org/">Boot floppies $DIR</a></h1>
56 <div class="network">
57 <a href="http://www.slitaz.org/" class="home"></a>
58 <ul id="menu">
59 <li>
60 <a href="floppy-grub4dos"
61 title="Boot tools"
62 >Generic boot floppy</a>
63 </li>
64 <li>
65 <a href="http://tiny.slitaz.org/"
66 title="SliTaz in one floppy and 4Mb RAM"
67 >Tiny SliTaz</a>
68 <ul>
69 $(
70 list_version | \
71 while read dir; do
72 case "$dir" in
73 *-*)
74 echo -n " <li>"
75 text="${dir/-/ }";;
76 *)
77 echo -n " $ul<li>"
78 text="SliTaz ${dir/-/ }";;
79 esac
81 echo " <a href=\"index-$dir.html\""
82 echo " title=\"$(cat $dir/title)\""
83 echo " >$text</a>"
85 case "$dir" in
86 *-*)
87 echo " </li>";;
88 *)
89 echo " <ul>"
90 ul=" </ul>
91 </li>";;
92 esac
93 done )
94 </ul>
95 </li>
96 </ul>
97 </li>
98 <li>
99 <a href="builder/index.php"
100 title="Build floppies with your own kernel and initramfs"
101 >Floppy set builder</a>
102 <ul>
103 <li>
104 <a href="builder/bootloader"
105 title="Build your floppy sets without Internet"
106 >Standalone shell</a>
107 </li>
108 </ul>
109 </li>
110 </ul>
111 </div>
112 </header>
114 <!-- Block -->
115 <div class="block"><div>
117 <!-- Information/image -->
118 <div class="block_info">
119 <header>Available boot floppies</header>
120 <ul>
121 $(
122 tail=""
123 list_version | \
124 while read dir; do
125 case "$dir" in
126 web*) echo -en "\n &middot; <a href=\"index-$dir.html\">web</a>" ;;
127 mini*) echo -en "\n &middot; <a href=\"index-$dir.html\">mini</a>" ;;
128 loram*) echo -en "\n &middot; <a href=\"index-$dir.html\">loram</a>" ;;
129 *) echo -en "$tail <li><a href=\"index-$dir.html\">SliTaz $dir</a>" ;;
130 esac
131 tail="</li>\n"
132 done
133 )</li>
134 </ul>
135 </div>
137 <!-- Navigation -->
138 <nav>
139 <header>1.44MB SliTaz$TYPE $VERSION floppy images</header>
140 <div class="large"><table>
141 $(
142 n=0
143 for f in $DIR/fd*img ; do
144 [ $n -eq 0 ] && echo " <tr>"
145 echo " <td><a href=\"$f\">$(basename $f .img)</a></td>"
146 n=$(( ($n+1)%6 ))
147 [ $n -eq 0 ] && echo " </tr>"
148 done
149 [ $n -eq 0 ] && echo " <tr>"
150 while [ $n -ne 5 ]; do
151 echo " <td> </td>"
152 n=$(($n+1))
153 done
154 )
155 <td><a href="$DIR/md5sum">md5</a></td>
156 </tr>
157 </table></div>
158 </nav>
159 </div></div>
162 <!-- Content -->
163 <main>
165 <h2>$TITLE</h2>
167 <p>This floppy set will boot a SliTaz $stable$TYPE version. You can write floppies
168 with SliTaz <code>bootfloppybox</code>, <a
169 href="http://en.wikipedia.org/wiki/RaWrite" target="_blank">Windows rawrite</a>
170 or simply <code>dd</code>:</p>
172 <pre># dd if=fd001.img of=/dev/fd0</pre>
174 <p>If you have a CD-ROM, a USB port and a USB key or a network card, but you
175 can't boot these devices directly, then try <a
176 href="http://mirror.slitaz.org/boot/floppy-grub4dos" target="_blank"
177 >floppy-grub4dos</a> first. This 1.44Mb floppy provides tiny programs to boot
178 these devices without BIOS support and some other tools.</p>
180 $(cat $DIR/description.html)
182 <p>Each floppy set detects disk swaps and can be used without a keyboard.</p>
184 <p>Good luck.</p>
187 <h2 id="fdiso">ISO image floppy set</h2>
189 <form method="get" action="http://mirror1.slitaz.org/floppies/download.php">
191 <p>The floppy image set above includes an embedded installer and can install
192 SliTaz on your hard disk.</p>
194 <p>Anyhow you may want these ISO images to <a
195 href="http://doc.slitaz.org/en:guides:uncommoninst#floppy-install">install
196 SliTaz</a>
198 <select name="iso">
199 $(
200 for file in $(ls ../iso/*/flavors/slitaz-*.iso ../iso/*/slitaz-*.iso | sort); do
201 set -- $(echo $(basename $file .iso) | sed 's/-/ /g')
202 echo " <option value=\"${file#../}\">${3:-core} $4 $2</option>"
203 done
204 )
205 </select>
207 <input name="build" value="Build floppy set" type="submit"/>
208 </p>
209 </form>
211 <p>You can restore the ISO image on your hard disk using:</p>
213 <pre>
214 # dd if=/dev/fd0 of=fdiso01.img
215 # dd if=/dev/fd0 of=fdiso02.img
216 # ...
217 # cat fdiso*.img | cpio -i
218 </pre>
221 <h2>Images generation</h2>
223 <ul>
224 <li>All these floppy images are built from a <i>core</i> or a <i>Nin1</i>
225 ISO.</li>
226 <li>The <i>loram</i> is preprocessed by <code>tazlitobox</code> (Low RAM
227 tab) or <code>tazlito build-loram</code>.</li>
228 <li>The versions 1.0 and 2.0 are built with <code>bootfloppybox</code>
229 available since 3.0.</li>
230 <li>The newer versions are built with <code>taziso floppyset</code>
231 available since 5.0.</li>
232 <li>You can extract the <u>kernel</u>, <u>cmdline</u> and <u>rootfs*</u>
233 files with <a href="floppies">this tool</a>.</li>
234 <li>You can change the floppy format (to 2.88M, 1.2M ...)
235 with <a href="resizefdset.sh">this tool</a>.</li>
236 </ul>
238 <!-- End of content -->
239 </main>
242 <script>
243 function QRCodePNG(str, obj) {
244 try {
245 obj.height = obj.width += 300;
246 return QRCode.generatePNG(str, {ecclevel: 'H'});
247 }
248 catch (any) {
249 var element = document.createElement("script");
250 element.src = "/static/qrcode.min.js";
251 element.type = "text/javascript";
252 element.onload = function() {
253 obj.src = QRCode.generatePNG(str, {ecclevel: 'H'});
254 };
255 document.body.appendChild(element);
256 }
257 }
258 </script>
260 <footer>
261 <div>
262 Copyright &copy; <span class="year"></span>
263 <a href="http://www.slitaz.org/">SliTaz</a>
264 </div>
265 <div>
266 Network:
267 <a href="http://scn.slitaz.org/">Community</a> &middot;
268 <a href="http://doc.slitaz.org/">Doc</a> &middot;
269 <a href="http://forum.slitaz.org/">Forum</a> &middot;
270 <a href="http://pkgs.slitaz.org/">Packages</a> &middot;
271 <a href="http://bugs.slitaz.org">Bugs</a> &middot;
272 <a href="http://hg.slitaz.org/?sort=lastchange">Hg</a>
273 </div>
274 <div>
275 SliTaz @
276 <a href="http://twitter.com/slitaz">Twitter</a> &middot;
277 <a href="http://www.facebook.com/slitaz">Facebook</a> &middot;
278 <a href="http://distrowatch.com/slitaz">Distrowatch</a> &middot;
279 <a href="http://en.wikipedia.org/wiki/SliTaz">Wikipedia</a> &middot;
280 <a href="http://flattr.com/profile/slitaz">Flattr</a>
281 </div>
282 <img src="/static/qr.png" alt="#" onmouseover="this.title = location.href"
283 onclick="this.src = QRCodePNG(location.href, this)"/>
284 </footer>
286 </body>
287 </html>
288 EOT
289 }
291 if [ -n "$1" ]; then
292 build_page $1
293 else
294 list_version | while read dir ; do
295 [ -s $dir/description.html ] || continue
296 [ -s $dir/md5sum ] || continue
297 build_page $dir > index-$dir.html
298 done
299 fi