]> arthur.barton.de Git - bup.git/blob - t/test-import-duplicity.sh
Add documentation for import-duplicity
[bup.git] / t / test-import-duplicity.sh
1 #!/usr/bin/env bash
2 . ./wvtest-bup.sh || exit $?
3
4 set -o pipefail
5
6 top="$(WVPASS pwd)" || exit $?
7 tmpdir="$(WVPASS wvmktempdir)" || exit $?
8
9 export BUP_DIR="$tmpdir/bup"
10 export GIT_DIR="$tmpdir/bup"
11
12 bup() { "$top/bup" "$@"; }
13
14 if ! [ "$(type -p duplicity)" != "" ]; then
15     # FIXME: add WVSKIP.
16     echo "Cannot find duplicity; skipping test)" 1>&2
17     exit 0
18 fi
19
20 export PASSPHRASE=bup_duplicity_passphrase
21 D=duplicity.tmp
22 WVSTART "import-duplicity"
23 WVPASS bup init
24 WVPASS cd "$tmpdir"
25 WVPASS mkdir duplicity
26 WVPASS duplicity "$top/Documentation" "file://duplicity"
27 WVPASS bup tick
28 WVPASS duplicity "$top/Documentation" "file://duplicity"
29 WVPASS bup import-duplicity "file://duplicity" import-duplicity
30 WVPASSEQ "$(bup ls import-duplicity/ | wc -l)" "3"
31 WVPASSEQ "$(bup ls import-duplicity/latest/ | sort)" "$(ls $top/Documentation | sort)"
32
33 WVPASS rm -rf "$tmpdir"