about summary refs log tree commit diff stats
path: root/leo.pl
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-08-27 18:02:02 +0530
committerAndinus <andinus@nand.sh>2020-08-27 18:02:02 +0530
commit1e63070b73b6950eb4f798f20176a94bff73349d (patch)
tree12d788e18f5cbac51a7ef52bbebcd8ea23fd13b5 /leo.pl
parentcb14d4e8506fe1b34c88a02c3008694e242423ea (diff)
downloadleo-1e63070b73b6950eb4f798f20176a94bff73349d.tar.gz
Add help option, update documentation to explain new profiles
Diffstat (limited to 'leo.pl')
-rwxr-xr-xleo.pl7
1 files changed, 4 insertions, 3 deletions
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};
 }