diff options
author | Andinus <andinus@nand.sh> | 2020-08-27 15:07:04 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2020-08-27 15:07:04 +0530 |
commit | 252af66a78927f8e10e07f7e289ba1b2f968a8a8 (patch) | |
tree | 17083bc22e8a0d4ef50a441f499d69bae4207917 | |
parent | 42b3e462cb676dafa469b393c1b60211e69f91d4 (diff) | |
download | leo-252af66a78927f8e10e07f7e289ba1b2f968a8a8.tar.gz |
Print Encrypted/Signed status , don't encrypt journal
My journal is already encrypted so don't encrypt it again.
-rwxr-xr-x | leo.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/leo.pl b/leo.pl index f2361f4..8fb200c 100755 --- a/leo.pl +++ b/leo.pl @@ -25,9 +25,12 @@ my %dispatch = ( "-C", "$ENV{HOME}/documents", "."); }, "journal" => sub { + my $tmp = $options{encrypt} and undef $options{encrypt} + if $options{encrypt}; archive("$archive_dir/journal_$ymd.tar", "-C", "$ENV{HOME}/documents", "andinus.org.gpg", "archive.org.gpg"); + $options{encrypt} = $tmp; }, "ssh" => sub { archive("$archive_dir/ssh_$ymd.tar", @@ -89,7 +92,10 @@ sub encrypt_sign() { $? # We assume non-zero is an error. ? die "Encrypt/Sign failed :: $?\n" - : say "\nOutput: $file.gpg"; + : print "\nOutput: $file.gpg"; + print " [Encrypted]" if $options{encrypt}; + print " [Signed]" if $options{sign}; + print "\n"; unlink $file and say "$file deleted." or warn "[WARN] Could not delete $file: $!\n" |