about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2020-08-27 18:55:17 +0530
committerAndinus <andinus@nand.sh>2020-08-27 18:55:17 +0530
commitecf1581cfde9e4872d28a77baac7b3ceafcacf7a (patch)
tree2e91587bceeb5dfc2f60b00f9bd32e187df782d5
parent1e63070b73b6950eb4f798f20176a94bff73349d (diff)
downloadleo-ecf1581cfde9e4872d28a77baac7b3ceafcacf7a.tar.gz
Remove date from archive files, add date to archive directory
This format is better than keeping lots of files in a single
directory.
-rwxr-xr-xleo.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/leo.pl b/leo.pl
index cd6a297..c208169 100755
--- a/leo.pl
+++ b/leo.pl
@@ -19,8 +19,8 @@ $options{sign} = $ENV{LEO_SIGN};
 $options{delete} = $ENV{LEO_DELETE};
 
 my $gpg_fingerprint = "D9AE4AEEE1F1B3598E81D9DFB67D55D482A799FD";
-my $archive_dir = "/tmp/archive";
 my $ymd = ymd(); # YYYY-MM-DD.
+my $archive_dir = "/tmp/archive/$ymd";
 
 path($archive_dir)->mkpath; # Create archive directory.
 my $prof;
@@ -56,7 +56,7 @@ foreach my $arg ( @ARGV ) {
             if $prof eq "journal" and $options{encrypt};
 
         # Deref the array here because we want flattened list.
-        archive("$archive_dir/${arg}_$ymd.tar", $profile{$arg}->@*);
+        archive("$archive_dir/${arg}.tar", $profile{$arg}->@*);
 
         $options{encrypt} = $tmp if $prof eq "journal";
     } else {