about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-09-02 21:05:04 +0530
committerAndinus <andinus@nand.sh>2020-09-02 21:05:04 +0530
commit88d6d56531d37a9b8e12bab9d64842297a38b73d (patch)
treebb4b982b92e56eff581c4627df91a19f1a412651
parentea14e7c304657092d066d744be65d688187fc0ea (diff)
downloadleo-88d6d56531d37a9b8e12bab9d64842297a38b73d.tar.gz
Create profiles on the fly
-rwxr-xr-xleo.pl7
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";
     }
 }
 
00 2377 - stop using operator[] in map' href='/akkartik/mu/commit/064random.cc?h=hlt&id=795f5244abc9b9f26ff621fd1997db427289d2ba'>795f5244 ^
166e3c0d ^



8cb4e365 ^








795f5244 ^
166e3c0d ^
8cb4e365 ^
166e3c0d ^
795f5244 ^
e4630643 ^

5f98a10c ^
795f5244 ^
e4630643 ^

166e3c0d ^



cfb142b9 ^
8cb4e365 ^











1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62