From d500ccfbd90f506cd59bc1c7b608184a1f9c88d1 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Thu, 11 Aug 2016 08:53:47 -0500 Subject: [PATCH] Use `-f -` with tar `-x`, `-c`, and `-t` operations (#18) --- yadm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yadm b/yadm index 536e64c..cbf8e80 100755 --- a/yadm +++ b/yadm @@ -214,7 +214,7 @@ function decrypt() { fi #; decrypt the archive - (gpg -d "$YADM_ARCHIVE" || echo 1) | tar v$tar_option -C "$YADM_WORK" + (gpg -d "$YADM_ARCHIVE" || echo 1) | tar v${tar_option}f - -C "$YADM_WORK" if [ $? = 0 ] ; then [ ! "$DO_LIST" = "YES" ] && echo "All files decrypted." else @@ -261,7 +261,7 @@ function encrypt() { echo #; encrypt all files which match the globs - tar -c "${GLOBS[@]}" | gpg --yes "${GPG_OPTS[@]}" --output "$YADM_ARCHIVE" + tar -f - -c "${GLOBS[@]}" | gpg --yes "${GPG_OPTS[@]}" --output "$YADM_ARCHIVE" if [ $? = 0 ]; then echo "Wrote new file: $YADM_ARCHIVE" else