diff options
author | Andinus <andinus@nand.sh> | 2020-09-02 21:05:04 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2020-09-02 21:05:04 +0530 |
commit | 88d6d56531d37a9b8e12bab9d64842297a38b73d (patch) | |
tree | bb4b982b92e56eff581c4627df91a19f1a412651 | |
parent | ea14e7c304657092d066d744be65d688187fc0ea (diff) | |
download | leo-88d6d56531d37a9b8e12bab9d64842297a38b73d.tar.gz |
Create profiles on the fly
-rwxr-xr-x | leo.pl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/leo.pl b/leo.pl index 96bc921..c2cbff5 100755 --- a/leo.pl +++ b/leo.pl @@ -49,8 +49,13 @@ foreach my $arg ( @ARGV ) { backup("$backup_dir/${arg}.tar", $profile{$arg}->@*); $options{encrypt} = $tmp if $prof eq "journal"; + } elsif ( -e $ENV{HOME}/$arg ) { + # If the file/directory exist then create a new profile & run + # backup. + say "++++++++********++++++++"; + backup("$backup_dir/${arg}.tar", $arg); } else { - warn "[WARN] leo: no such option :: $arg \n"; + warn "[WARN] leo: no such profile :: `$arg' \n"; } } |