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)
Diff
1diff --git a/duplicity-backup.sh b/duplicity-backup.sh
2index 5dcae5ede587a59cf0c09b483ea3157a47da8e8c..4fc04ce2c41107a7bb257182f705057e821c975f 100644
3--- a/duplicity-backup.sh
4+++ b/duplicity-backup.sh
5@@ -656,11 +656,11 @@ backup_this_script()
6 7 echo -e ${README_TXT} > ${README}
8 echo "Encrypting tarball, choose a password you'll remember..."
9- tar c ${TMPDIR} | gpg -aco ${TMPFILENAME}
10+ tar -cf - ${TMPDIR} | gpg -aco ${TMPFILENAME}
11 rm -Rf ${TMPDIR}
12 echo -e "\nIMPORTANT!!"
13 echo ">> To restore these files, run the following (remember your password):"
14- echo "gpg -d ${TMPFILENAME} | tar x"
15+ echo "gpg -d ${TMPFILENAME} | tar -xf -"
16 echo -e "\nYou may want to write the above down and save it with the file."
17 }
18