Make tar stdin/stdout explicit in backup function

Fixes (show stopper) error on FreeBSD, potentially other platforms: 
$ gpg -d duplicity-backup-2015-xx-xx.tar.gpg | tar x
tar: Error opening archive: Failed to open '/dev/sa0'
(tar does not r/w to stdin/out by default, you have to specify)
This commit is contained in:
bayareamarketing 2015-06-24 13:33:06 +02:00
parent 19951b7180
commit 0644d7679c

View file

@ -656,11 +656,11 @@ backup_this_script()
echo -e ${README_TXT} > ${README}
echo "Encrypting tarball, choose a password you'll remember..."
tar c ${TMPDIR} | gpg -aco ${TMPFILENAME}
tar -cf - ${TMPDIR} | gpg -aco ${TMPFILENAME}
rm -Rf ${TMPDIR}
echo -e "\nIMPORTANT!!"
echo ">> To restore these files, run the following (remember your password):"
echo "gpg -d ${TMPFILENAME} | tar x"
echo "gpg -d ${TMPFILENAME} | tar -xf -"
echo -e "\nYou may want to write the above down and save it with the file."
}