slitaz-forge view dvd/download.php @ rev 701

Update mirrors list
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Oct 26 20:57:39 2019 +0300 (2019-10-26)
parents
children
line source
1 <?php
3 $options = array(
4 "boot" => "--boot",
5 "webboot" => "--webboot",
6 "website" => "--website",
7 "wok" => "--wok", // TOFIX --wok-stable
8 "filter" => "--filter",
9 "sources" => "--sources",
10 "loram_detect" => "--loram-detect",
11 "auto_install" => "--auto-install",
13 "packages" => "--packages",
14 "rsync" => "--rsync",
15 "doc" => "--doc",
16 "tiny" => "--tiny",
17 "pxe" => "--pxe",
18 "tools" => "--tools",
19 "hg" => "--hg",
20 "nonfree" => "--nonfree",
21 "huge" => "--huge"
22 );
23 $size = $_POST['size'];
24 $cmdline = "set -- ".$_POST['version'];
25 foreach ($options as $var => $arg)
26 if (isset($_POST[$var]) && $_POST[$var] == 'on')
27 $cmdline .= " ".$arg;
28 $name = "genDVDimage.sh";
29 $script =<<<EOT
30 #!/bin/sh
32 if [ "\$(basename \$0)" == "$name" -a "\$1" == "" ]; then
34 # Default arguments by the web tool http://dvd.slitaz.org/
35 # Expected size: $size KB
36 $cmdline
37 fi
40 EOT;
41 $script .= file_get_contents("mkpkgiso");
43 header("Content-Type: application/octet-stream");
44 header("Content-Length: ".strlen($script));
45 header("Content-Disposition: attachment; filename=".$name);
46 echo $script;
48 ?>