equal
deleted
inserted
replaced
31 my %o = ( |
31 my %o = ( |
32 compress => undef, |
32 compress => undef, |
33 verbose => undef, |
33 verbose => undef, |
34 blocksize => 4 * MiB, |
34 blocksize => 4 * MiB, |
35 pass => undef, |
35 pass => undef, |
|
36 comment => undef, |
36 ); |
37 ); |
37 lock_keys(%o); |
38 lock_keys(%o); |
38 |
39 |
39 my $NOW = time(); |
40 my $NOW = time(); |
40 |
41 |
46 -verbose => 2, |
47 -verbose => 2, |
47 exit => 0, |
48 exit => 0, |
48 -noperldoc => system("perldoc -V >/dev/null 2>&1") |
49 -noperldoc => system("perldoc -V >/dev/null 2>&1") |
49 ); |
50 ); |
50 }, |
51 }, |
|
52 "c|comment=s" => \$o{comment}, |
51 "z|compress:i" => sub { $o{compress} = $_[1] ? $_[1] : Z_BEST_SPEED }, |
53 "z|compress:i" => sub { $o{compress} = $_[1] ? $_[1] : Z_BEST_SPEED }, |
52 "p|pass=s" => \$o{pass}, |
54 "p|pass=s" => \$o{pass}, |
53 "b|blocksize=s" => sub { |
55 "b|blocksize=s" => sub { |
54 given ($_[1]) { |
56 given ($_[1]) { |
55 when (/(\d+)G/i) { $o{blocksize} = $1 * GiB }; |
57 when (/(\d+)G/i) { $o{blocksize} = $1 * GiB }; |
105 filesystem: $src |
107 filesystem: $src |
106 blocksize: $o{blocksize} |
108 blocksize: $o{blocksize} |
107 devsize: $size |
109 devsize: $size |
108 timestamp: @{[NOW]} |
110 timestamp: @{[NOW]} |
109 datetime: @{[DATETIME]} |
111 datetime: @{[DATETIME]} |
|
112 comment: @{[$o{comment}//"none"]} |
|
113 encryption: @{[$o{pass} ? CIPHER : "none"]} |
110 |
114 |
111 __EOT |
115 __EOT |
112 |
116 |
113 open(my $in => $src); |
117 open(my $in => $src); |
114 binmode($in); |
118 binmode($in); |
242 |
246 |
243 =item B<-b> I<blocksize> | B<--blocksize>=I<blocksize> |
247 =item B<-b> I<blocksize> | B<--blocksize>=I<blocksize> |
244 |
248 |
245 The blocksize used. (may be suffixed with K, M, G). (default: 4 MiB) |
249 The blocksize used. (may be suffixed with K, M, G). (default: 4 MiB) |
246 |
250 |
|
251 =item B<-c> I<comment> | B<--comment>=I<comment> |
|
252 |
|
253 Comment to be included in the header of the index file. (default: none) |
|
254 |
247 =item B<-p> I<pass> | B<--pass>=I<pass> |
255 =item B<-p> I<pass> | B<--pass>=I<pass> |
248 |
256 |
249 Use symmetric encryption for writing the data blocks. This option |
257 Use symmetric encryption for writing the data blocks. This option |
250 is passed to L<openssl(3)>. |
258 is passed to L<openssl(3)>. |
251 |
259 |