about summary refs log tree commit diff stats
path: root/leo.pl
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-08-31 16:55:34 +0530
committerAndinus <andinus@nand.sh>2020-08-31 16:55:34 +0530
commitc5295e12c7d1ec71f234dda8a69a0093157b0e64 (patch)
treeab7917fac11d82eef8f8de4a3db50da11b25fc13 /leo.pl
parent9a68a8119a88ce42e7ab7384168e5bfe35d20a41 (diff)
downloadleo-c5295e12c7d1ec71f234dda8a69a0093157b0e64.tar.gz
Fix options checking
options passed via arguments were being ignored.
Diffstat (limited to 'leo.pl')
-rwxr-xr-xleo.pl10
1 files changed, 6 insertions, 4 deletions
diff --git a/leo.pl b/leo.pl
index 4f25186..39dcc9e 100755
--- a/leo.pl
+++ b/leo.pl
@@ -8,15 +8,17 @@ use IPC::Run3;
 use Path::Tiny;
 use Getopt::Long qw/ GetOptions /;
 
-my %options = ();
+my %options = (
+    encrypt => $ENV{LEO_ENCRYPT},
+    sign => $ENV{LEO_SIGN},
+    delete => $ENV{LEO_DELETE},
+);
+
 GetOptions(
     \%options,
     qw{ verbose encrypt sign delete help }
 ) or die "Error in command line arguments\n";
 
-$options{encrypt} = $ENV{LEO_ENCRYPT};
-$options{sign} = $ENV{LEO_SIGN};
-$options{delete} = $ENV{LEO_DELETE};
 
 my $gpg_fingerprint = "D9AE4AEEE1F1B3598E81D9DFB67D55D482A799FD";
 my $ymd = ymd(); # YYYY-MM-DD.