source: flacrip/trunk/mkmp3iso @ 41

Last change on this file since 41 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
2use strict;
3
4use Getopt::Long;
5use YAML;
6use File::Basename;
7
8GetOptions(
9    'o=s' => \my $ISO_FILE,
10    'n'   => \my $DRY_RUN,
11);
12
13die "Usage: $0 -o <iso_file> dir [dir...]\n" unless $ISO_FILE;
14
15my @DIRS = @ARGV;
16
17#my %graft_points = map { my $dir = $_; s/^.*?\.//; "/$_" => $dir } @DIRS;
18#my %graft_points = map { "/" . basename($_) => $_ } @DIRS;
19my %graft_points = map { my $dir = $_; $_ = basename($_); s{\.}{/}g; "/$_" => $dir } @DIRS;
20
21my @graft_points = map { "$_=$graft_points{$_}" } sort keys %graft_points;
22
23print Dump(\@graft_points);
24
25exit if $DRY_RUN;
26
27system 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.