slitaz-forge diff dvd/download.php @ 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 | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dvd/download.php Fri Jul 23 16:41:12 2021 +0000 1.3 @@ -0,0 +1,48 @@ 1.4 +<?php 1.5 + 1.6 +$options = array( 1.7 + "boot" => "--boot", 1.8 + "webboot" => "--webboot", 1.9 + "website" => "--website", 1.10 + "wok" => "--wok", // TOFIX --wok-stable 1.11 + "filter" => "--filter", 1.12 + "sources" => "--sources", 1.13 + "loram_detect" => "--loram-detect", 1.14 + "auto_install" => "--auto-install", 1.15 + 1.16 + "packages" => "--packages", 1.17 + "rsync" => "--rsync", 1.18 + "doc" => "--doc", 1.19 + "tiny" => "--tiny", 1.20 + "pxe" => "--pxe", 1.21 + "tools" => "--tools", 1.22 + "hg" => "--hg", 1.23 + "nonfree" => "--nonfree", 1.24 + "huge" => "--huge" 1.25 + ); 1.26 +$size = $_POST['size']; 1.27 +$cmdline = "set -- ".$_POST['version']; 1.28 +foreach ($options as $var => $arg) 1.29 + if (isset($_POST[$var]) && $_POST[$var] == 'on') 1.30 + $cmdline .= " ".$arg; 1.31 +$name = "genDVDimage.sh"; 1.32 +$script =<<<EOT 1.33 +#!/bin/sh 1.34 + 1.35 +if [ "\$(basename \$0)" == "$name" -a "\$1" == "" ]; then 1.36 + 1.37 + # Default arguments by the web tool http://dvd.slitaz.org/ 1.38 + # Expected size: $size KB 1.39 + $cmdline 1.40 +fi 1.41 + 1.42 + 1.43 +EOT; 1.44 +$script .= file_get_contents("mkpkgiso"); 1.45 + 1.46 +header("Content-Type: application/octet-stream"); 1.47 +header("Content-Length: ".strlen($script)); 1.48 +header("Content-Disposition: attachment; filename=".$name); 1.49 +echo $script; 1.50 + 1.51 +?>