annotate cd-simple-burn.pl @ 23:9fd4948b4303

s.
author Robert McIntyre <rlm@mit.edu>
date Thu, 29 Jan 2015 20:47:48 -0800
parents d1607d25ffba
children
rev   line source
rlm@20 1 #!/bin/perl
rlm@20 2
rlm@20 3 use File::Basename;
rlm@20 4
rlm@20 5 $tmp_iso="/home/r/tmp/image.iso";
rlm@20 6
rlm@20 7 @graft_points = ("-graft-points");
rlm@20 8
rlm@20 9 for $graft_point(@ARGV){
rlm@20 10 push(@graft_points, '"'. basename($graft_point) .'"' . "="
rlm@20 11 . '"'. $graft_point . '"');
rlm@20 12 }
rlm@20 13
rlm@20 14 @mkisofs_args = ("-iso-level", "4", "-r", "-quiet");
rlm@20 15
rlm@20 16 @mkisofs_args = (@mkisofs_args, @graft_points);
rlm@20 17
rlm@20 18
rlm@20 19 # get size of stuff
rlm@20 20 $size = `mkisofs -print-size @mkisofs_args 2>/dev/null`;
rlm@20 21 chomp($size);
rlm@20 22
rlm@20 23 @burn_command = ("cdrecord", "gracetime=3", "-v",
rlm@20 24 "tsize=".$size."s", "-data", "-");
rlm@20 25
rlm@20 26 $final_command = "mkisofs @mkisofs_args | @burn_command";
rlm@20 27
rlm@20 28 print "$final_command\n";
rlm@20 29 system($final_command);
rlm@20 30