about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-11-15 11:23:05 +0530
committerAndinus <andinus@nand.sh>2020-11-15 11:23:05 +0530
commit77e330618c5d8e9ed1d5c9589d30678f7ed9d0fe (patch)
treec9ff340fd81fcbd5e0c499d97370b644e9e6c76d
parent04da16dd682a073513e989276ed179a1a27f8c9a (diff)
downloadleo-77e330618c5d8e9ed1d5c9589d30678f7ed9d0fe.tar.gz
Add support for setting options from environment variables
This is mentioned in man page but wasn't implemented.
-rwxr-xr-xleo.pl8
1 files changed, 7 insertions, 1 deletions
diff --git a/leo.pl b/leo.pl
index 17b6482..4854830 100755
--- a/leo.pl
+++ b/leo.pl
@@ -13,7 +13,13 @@ use Getopt::Long qw/ GetOptions /;
 my $version = "leo v0.4.0";
 
 # Options.
-my %options;
+my %options = (
+    L_SIGN => $ENV{L_SIGN},
+    L_GZIP => $ENV{L_GZIP},
+    L_ENCRYPT => $ENV{L_ENCRYPT},
+    L_SIGNIFY => $ENV{L_SIGNIFY},
+);
+
 GetOptions(
     \%options,
     qw{ verbose help version }