annotate cd-burn.pl @ 10:07bb57b65da1
pipeline burning appears to work.
author |
Robert McIntyre <rlm@mit.edu> |
date |
Mon, 25 Feb 2013 14:15:13 +0000 |
parents |
acd110f8e4b0 |
children |
e15c393dffa8 |
rev |
line source |
rlm@10
|
1 #!/bin/perl
|
rlm@10
|
2
|
rlm@10
|
3 use File::Basename;
|
rlm@10
|
4
|
rlm@10
|
5 $tmp_iso="/home/r/tmp/image.iso";
|
rlm@10
|
6
|
rlm@10
|
7 @graft_points = ("-graft-points");
|
rlm@10
|
8
|
rlm@10
|
9 for $graft_point(@ARGV){
|
rlm@10
|
10 push(@graft_points, '"'. basename($graft_point) .'"' . "="
|
rlm@10
|
11 . '"'. $graft_point . '"');
|
rlm@10
|
12 }
|
rlm@10
|
13
|
rlm@10
|
14 @mkisofs_args = ("-iso-level", "4", "-r", "-J");
|
rlm@10
|
15
|
rlm@10
|
16 @mkisofs_args = (@mkisofs_args, @graft_points);
|
rlm@10
|
17
|
rlm@10
|
18
|
rlm@10
|
19 # get size of stuff
|
rlm@10
|
20 $size = `mkisofs -print-size @mkisofs_args 2>/dev/null`;
|
rlm@10
|
21 chomp($size);
|
rlm@10
|
22
|
rlm@10
|
23 @burn_command = ("cdrecord", "gracetime=3",
|
rlm@10
|
24 "-overburn", "tsize=".$size."s", "-data", "-");
|
rlm@10
|
25
|
rlm@10
|
26
|
rlm@10
|
27 $final_command = "mkisofs @mkisofs_args | @burn_command";
|
rlm@10
|
28
|
rlm@10
|
29 print "$final_command\n";
|
rlm@10
|
30 system($final_command);
|