From 77e330618c5d8e9ed1d5c9589d30678f7ed9d0fe Mon Sep 17 00:00:00 2001 From: Andinus Date: Sun, 15 Nov 2020 11:23:05 +0530 Subject: Add support for setting options from environment variables This is mentioned in man page but wasn't implemented. --- leo.pl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 } -- cgit 1.4.1-2-gfad0