| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
| |
This will not work with previous configs. But that's fine because I'm
the only one using this.
|
| |
|
|
|
|
|
| |
There are still issues with this, for example the user can't pass
``documents/text.txt'' or anything in sub-directory.
|
| |
|
|
|
|
|
| |
I'll switch to some other config format later, this format is not safe
at all!
|
|
|
|
| |
options passed via arguments were being ignored.
|
| |
|
|
|
|
|
|
|
|
| |
This is a backup program now. By archive I think of something else,
like I archive web pages to save them offline. And by backup I think
of storing files safely somewhere so that we can restore it later.
Doesn't matter.
|
|
|
|
|
| |
This format is better than keeping lots of files in a single
directory.
|
| |
|
|
|
|
|
|
|
| |
Now we can use aliases again, no dispatch table required, help is
generated automatically & configuration looks much simpler. We can
still have special profiles like I've created for journal directly
when calling archive().
|
|
|
|
|
|
|
| |
I'm trying to make it easier to print help message, I don't want to
print it manually. After this I'll just turn the dispatch table into
just table which contains all the paths to be archived & then I'll be
able to print help nicely.
|
|
|
|
|
|
| |
Problem with aliases was that profile name would still be say `.ssh'
for ssh which means the archive created will be `.ssh-...tar' which is
not what I wanted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I added a lot of things to profile, there was a lot of repetition in
dispatch table so I moved it to a function. Aliases were used for
inconvenient paths but I could've done this too:
my %directories = (
ssh => "$ENV{HOME}/.ssh",
pass => "$ENV{HOME}/.password-store",
);
foreach my $dir (sort keys %directories) {
$dispatch{$dir} = sub {
archive("$archive_dir/${dir}_${ymd}.tar",
"-C", "$directories{$dir}", ".");
};
}
|
| |
|
|
|
|
| |
My journal is already encrypted so don't encrypt it again.
|
|
|
|
|
| |
Now the user can run ``leo pass journal'' & both will be archived,
previously `journal' would've been ignored.
|
|
|
|
|
|
|
| |
Fixes this error:
gpg: WARNING: recipients (-r) given without using public key
encryption
|
|
|
|
|
| |
Maybe I should delete the tar file by default & add a `nodelete'
option.
|
|
|
|
| |
This will remove the archive after running gpg2.
|
| |
|
| |
|
|
|
|
| |
These will mostly remain unchanged so I moved them to the end.
|
|
|
|
|
| |
Moved @ARGV parsing & HelpMessage sub to the end. tar_create is now
a simple wrapper around `/bin/tar'.
|
|
|
|
|
|
| |
I'm thinking of making leo as my archive program instead of a
meta-program to hold all my scripts. It's simpler to keep them
seperated, meta-program would've been complex.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`archive_HelpMessage' was removed because variables from `archive' sub
are not shared with it.
On #perl@freenode:
<andinus> i have a sub archive_Help inside of sub archive, when i try to
use archive's var in archive_Help perl says "Variable
"$archive_dir" will not stay shared at..." [02:55]
[...]
<Grinnz> generally, you pass variables into subs that you call [02:57]
<Grinnz> defining a sub within another sub is evidence that you did it
wrong
[...]
<andinus> is defining a sub within a sub not a good idea?
<Grinnz> it does nothing useful [03:01]
<Grinnz> and causes issues like the one you are having
[...]
|
|
|
|
|
| |
"might overwrite" because I don't know what happens if tar fails,
maybe it leaves the file untouched (?).
|
|
|
|
|
| |
`pass' will archive `.password-store' directory which holds my
passwords.
|
|
|
|
|
|
|
|
| |
Date was added in `yyyy-mm-dd' format because it'll be easier to
manage these archives later.
`ssh' was added to archive list, it archives `$ENV{HOME}/.ssh'
directory.
|
|
|
|
|
|
| |
This does make tar_create() complex & confusing but that's okay
because otherwise there would've been lots of repetition in program as
I added more definied archive paths.
|
|
|
|
| |
`archive' will create tars of files, there is a pre-defined list.
|
|
|
|
|
| |
I moved these to a shell scripts again because it's much simpler.
Term::ANSIColor is not really required.
|
|
|
|
| |
`sync emacs irclogs' was too big, now it's `sync irclogs'.
|
|
|
|
|
| |
By default it syncs only the config now & the user has to mention
`irclogs' or `authinfo' to sync them.
|
|
|