annotate cd-crypt-burn.pl @ 24:75db8d48c313

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