diff options
| author | Tslil Clingman <tslil.clingman@gmail.com> | 2017-05-28 17:32:03 -0500 |
|---|---|---|
| committer | Tslil Clingman <tslil.clingman@gmail.com> | 2017-05-28 17:32:03 -0500 |
| commit | 721668ea57fda4254ceee9146c6b6bee470b3fc6 (patch) | |
| tree | f0f7a8078c601d47dd521567749b215f9ca36373 /bak | |
| parent | 6d1077a28b8d6f64ca72b9aa00f0b2cab97fb594 (diff) | |
Ran shellcheck, fixed (?) things
Diffstat (limited to 'bak')
| -rwxr-xr-x | bak | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -18,16 +18,16 @@ for k in $*; do path=$(echo ${strip%/*} | sed "s#$HOME##") stamp="$(date +%y%m%d-%H%M%S)" name="$(echo $bakdir/$path/$folder-$stamp.tar.xz | sed 's#//#/#g')" - echo Archiving and compressing $name ... - mkdir -p $bakdir/$path - cd $k; cd .. + echo Archiving and compressing "$name" ... + mkdir -p "$bakdir"/"$path" + cd "$k" || return 127 ; cd .. if [ -n "$e" ]; then - echo Encrypting $name - tar --xz --atime-preserve -p -cO $folder | gpg $e - > $name.gpg + echo Encrypting "$name" + tar --xz --atime-preserve -p -cO "$folder" | gpg "$e" - > "$name".gpg else - tar --xz --atime-preserve -p -cf $name $folder + tar --xz --atime-preserve -p -cf "$name" "$folder" fi; else - echo Skipping $k, not a directory + echo Skipping "$k", not a directory fi done |
