root/morphix/trunk/morph-scripts/iso-builder.pl

Revision 2, 0.8 kB (checked in by nextime, 2 years ago)

Initial import, branching from morphix svn

Line 
1 #!/usr/bin/perl -w
2 #
3 # ISO-builder is a small script to generate an ISO image ready for burning from
4 # a directory containing all the modules and boot image
5 #
6
7 use strict;
8
9 if ($> != 0) {
10     print "Sorry, you must be root to start the iso builder!\n";
11     exit 1;
12 }
13
14 if (@ARGV != 2) {
15     print "iso-builer, for Morphix/KNOPPIX based distros\n\n";
16     print "Usage:\n";
17     print "iso-builder.pl source-directory outputfile.iso\n";
18     exit 1;
19 }
20
21 our $i;
22 our $moddir = "";
23 our $output = "";
24 our $var;
25
26 for ($i = 0; $i < @ARGV; $i++) {
27     $var = $ARGV[$i];
28
29     if ($moddir eq "") {
30         $moddir = $ARGV[$i];
31         next;
32     }
33     $output = $ARGV[$i];
34 }
35
36 print "Building iso, please wait...\n";
37
38 system "mkisofs -pad -l -r -J -v -V \"Morphix\" -b base/boot.img -c base/boot.cat -hide-rr-moved -o $output $moddir";
39
40
41
Note: See TracBrowser for help on using the browser.