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