From 1e63070b73b6950eb4f798f20176a94bff73349d Mon Sep 17 00:00:00 2001 From: Andinus Date: Thu, 27 Aug 2020 18:02:02 +0530 Subject: Add help option, update documentation to explain new profiles --- leo.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'leo.pl') diff --git a/leo.pl b/leo.pl index 1222963..cd6a297 100755 --- a/leo.pl +++ b/leo.pl @@ -11,7 +11,7 @@ use Getopt::Long qw/ GetOptions /; my %options = (); GetOptions( \%options, - qw{ verbose encrypt sign delete } + qw{ verbose encrypt sign delete help } ) or die "Error in command line arguments\n"; $options{encrypt} = $ENV{LEO_ENCRYPT}; @@ -45,7 +45,7 @@ $profile{ssh} = $profile{".ssh"}; $profile{pass} = $profile{".password-store"}; $profile{mozilla} = $profile{".mozilla"}; -HelpMessage() and exit 0 if scalar @ARGV == 0; +HelpMessage() and exit 0 if scalar @ARGV == 0 or $options{help}; foreach my $arg ( @ARGV ) { $prof = $arg; # Set $prof. if ( $profile{ $arg } ) { @@ -129,7 +129,8 @@ Options: Sign files with $gpg_fingerprint --delete Delete the archive after running gpg2 - --verbose}; + --verbose + --help}; } -- cgit 1.4.1-2-gfad0