From 252af66a78927f8e10e07f7e289ba1b2f968a8a8 Mon Sep 17 00:00:00 2001 From: Andinus Date: Thu, 27 Aug 2020 15:07:04 +0530 Subject: Print Encrypted/Signed status , don't encrypt journal My journal is already encrypted so don't encrypt it again. --- leo.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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" -- cgit 1.4.1-2-gfad0