diff options
| author | Andinus <andinus@nand.sh> | 2020-11-11 15:48:01 +0530 |
|---|---|---|
| committer | Andinus <andinus@nand.sh> | 2020-11-11 15:48:01 +0530 |
| commit | 7b42b7d76d3647bbbb3b4f7ec60f8321208b6a97 (patch) | |
| tree | 1ca7356824d793df13dfe8b7f78bca06d5b374a0 | |
| parent | 4113886bf2e30bf80333d28011f5f2a53ba6ac22 (diff) | |
| download | leo-7b42b7d76d3647bbbb3b4f7ec60f8321208b6a97.tar.gz | |
CHange backup file's mode to 0600, bump versionv0.3.4
| -rw-r--r-- | README | 2 | ||||
| -rwxr-xr-x | leo.pl | 7 |
2 files changed, 8 insertions, 1 deletions
@@ -59,6 +59,8 @@ with signify(1). I use this to quickly backup some of my files. It works on profiles, profiles are simple lists of files which get backed up. + *Note*: Backup file's mode will be changed to `0600'. + 2.1 Profile ─────────── @@ -9,7 +9,7 @@ use Path::Tiny; use Config::Tiny; use Getopt::Long qw/ GetOptions /; -my $version = "leo v0.3.3"; +my $version = "leo v0.3.4"; # Options. @@ -151,6 +151,8 @@ sub backup { # Print absolute paths for all backup files/directories. : say path($_)->absolute('/'), " backed up." foreach @backup_paths; + path($tar_file)->chmod(0600) + and print "Changed `$tar_file' mode to 0600.\n"; print "File was compressed with gzip(1)\n" if $profile{$prof}{gzip}; print "\n" and tar_list($tar_file) if $options{verbose}; @@ -188,6 +190,9 @@ sub encrypt_sign { unlink $file and say "$file deleted." or warn "[WARN] Could not delete $file: $!\n"; + + path("$file.gpg")->chmod(0600) + and print "Changed `$file.gpg' mode to 0600.\n"; } sub signify { |