about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-10-14 21:29:00 +0530
committerAndinus <andinus@nand.sh>2020-10-14 21:29:00 +0530
commitcc7bb4f4fe70d5d2249dcd732408edf6e4203093 (patch)
treea590d4f134c90e81be0e13e11230ebe9425c8526
parent34cc5d8169b0b18ebf5dfaa8fc3b9e5323f93235 (diff)
downloadleo-cc7bb4f4fe70d5d2249dcd732408edf6e4203093.tar.gz
Add fallback for $gpg_fingerprint & $gpg_bin
-rwxr-xr-xleo.pl8
-rw-r--r--share/leo.conf3
2 files changed, 4 insertions, 7 deletions
diff --git a/leo.pl b/leo.pl
index f079419..5c57686 100755
--- a/leo.pl
+++ b/leo.pl
@@ -68,8 +68,8 @@ $backup_dir .= "/$ymd";
 
 path($backup_dir)->mkpath; # Create backup directory.
 
-my $gpg_fingerprint = $options{gpg_fingerprint};
-my $gpg_bin = $options{gpg_bin};
+my $gpg_fingerprint = $options{gpg_fingerprint} || "`nil'";
+my $gpg_bin = $options{gpg_bin} || "gpg";
 
 # Print help.
 HelpMessage() and exit 0 if scalar @ARGV == 0 or $options{help};
@@ -171,11 +171,11 @@ Profile:};
     print qq{
         Encrypt files with $gpg_fingerprint\n
     --sign };
-        print "[Enabled]" if $options{sign};
+    print "[Enabled]" if $options{sign};
     print qq{
         Sign files with $gpg_fingerprint\n
     --delete };
-            print "[Enabled]" if $options{delete};
+    print "[Enabled]" if $options{delete};
     print qq{
         Delete the tar file after running $gpg_bin\n
     --verbose
diff --git a/share/leo.conf b/share/leo.conf
index 33df185..15386fc 100644
--- a/share/leo.conf
+++ b/share/leo.conf
@@ -27,6 +27,3 @@ sign = 1
 /home/andinus/projects =
 # Exclude directories with `exclude' value.
 /home/andinus/projects/forks = exclude
-
-[academics]
-/home/andinus/documents/academics =