Last change
on this file since 34 was
19,
checked in by peter, 10 years ago
|
added a script to create an *.iso image file from a list of directories
|
-
Property svn:executable set to
*
|
File size:
687 bytes
|
Line | |
---|
1 | #!/usr/bin/perl -w |
---|
2 | use strict; |
---|
3 | |
---|
4 | use Getopt::Long; |
---|
5 | use YAML; |
---|
6 | use File::Basename; |
---|
7 | |
---|
8 | GetOptions( |
---|
9 | 'o=s' => \my $ISO_FILE, |
---|
10 | 'n' => \my $DRY_RUN, |
---|
11 | ); |
---|
12 | |
---|
13 | die "Usage: $0 -o <iso_file> dir [dir...]\n" unless $ISO_FILE; |
---|
14 | |
---|
15 | my @DIRS = @ARGV; |
---|
16 | |
---|
17 | #my %graft_points = map { my $dir = $_; s/^.*?\.//; "/$_" => $dir } @DIRS; |
---|
18 | #my %graft_points = map { "/" . basename($_) => $_ } @DIRS; |
---|
19 | my %graft_points = map { my $dir = $_; $_ = basename($_); s{\.}{/}g; "/$_" => $dir } @DIRS; |
---|
20 | |
---|
21 | my @graft_points = map { "$_=$graft_points{$_}" } sort keys %graft_points; |
---|
22 | |
---|
23 | print Dump(\@graft_points); |
---|
24 | |
---|
25 | exit if $DRY_RUN; |
---|
26 | |
---|
27 | system qw{mkisofs -r -graft-points -o}, $ISO_FILE, @graft_points; |
---|
28 | |
---|
29 | # then use cdrecord -v $ISO_FILE |
---|
Note: See
TracBrowser
for help on using the repository browser.