changeset 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
files cd-burn.pl simple-cd-backup.pl
diffstat 2 files changed, 30 insertions(+), 3 deletions(-) [+]
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);
     2.1 --- a/simple-cd-backup.pl	Mon Feb 25 13:34:38 2013 +0000
     2.2 +++ b/simple-cd-backup.pl	Mon Feb 25 14:15:13 2013 +0000
     2.3 @@ -1,8 +1,6 @@
     2.4  #!/bin/perl
     2.5  use File::Basename;
     2.6  
     2.7 -$tmp_iso="/home/r/tmp/image.iso";
     2.8 -
     2.9  @graft_points = ("-graft-points");
    2.10  
    2.11  for $graft_point(@ARGV){
    2.12 @@ -23,4 +21,3 @@
    2.13  
    2.14  print "Created $tmp_iso.\n";
    2.15  print "Use burn-tmp-iso-image to write to CD.\n";
    2.16 -