Mercurial > backup
diff 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 |
line wrap: on
line diff
1.1 --- a/cd-burn.pl Mon Feb 25 13:34:38 2013 +0000 1.2 +++ b/cd-burn.pl Mon Feb 25 14:15:13 2013 +0000 1.3 @@ -0,0 +1,30 @@ 1.4 +#!/bin/perl 1.5 + 1.6 +use File::Basename; 1.7 + 1.8 +$tmp_iso="/home/r/tmp/image.iso"; 1.9 + 1.10 +@graft_points = ("-graft-points"); 1.11 + 1.12 +for $graft_point(@ARGV){ 1.13 + push(@graft_points, '"'. basename($graft_point) .'"' . "=" 1.14 + . '"'. $graft_point . '"'); 1.15 +} 1.16 + 1.17 +@mkisofs_args = ("-iso-level", "4", "-r", "-J"); 1.18 + 1.19 +@mkisofs_args = (@mkisofs_args, @graft_points); 1.20 + 1.21 + 1.22 +# get size of stuff 1.23 +$size = `mkisofs -print-size @mkisofs_args 2>/dev/null`; 1.24 +chomp($size); 1.25 + 1.26 +@burn_command = ("cdrecord", "gracetime=3", 1.27 + "-overburn", "tsize=".$size."s", "-data", "-"); 1.28 + 1.29 + 1.30 +$final_command = "mkisofs @mkisofs_args | @burn_command"; 1.31 + 1.32 +print "$final_command\n"; 1.33 +system($final_command);