]> arthur.barton.de Git - bup.git/blobdiff - t/test-restore-single-file.sh
midx-cmd: accommodate python 3
[bup.git] / t / test-restore-single-file.sh
index a0c429b653750912960227f718f3632da4b97afc..f211ebc89614175706595e016ab4acff6e6f8951 100755 (executable)
@@ -1,25 +1,26 @@
 #!/usr/bin/env bash
-. ./wvtest-bup.sh
+. ./wvtest-bup.sh || exit $?
 
-set -e -o pipefail
+set -o pipefail
 
 WVSTART 'all'
 
-top="$(pwd)"
-tmpdir="$(wvmktempdir)"
+top="$(WVPASS pwd)" || exit $?
+tmpdir="$(WVPASS wvmktempdir)" || exit $?
 export BUP_DIR="$tmpdir/bup"
 
 bup() { "$top/bup" "$@"; }
 
-mkdir "$tmpdir/foo"
-mkdir "$tmpdir/foo/bar" # Make sure a dir sorts before baz (regression test).
-touch "$tmpdir/foo/baz"
-WVPASS bup init
-WVPASS bup index "$tmpdir/foo"
+WVPASS mkdir "$tmpdir/foo"
+WVPASS mkdir "$tmpdir/foo/bar" # Make sure a dir sorts before baz (regression test).
+WVPASS touch "$tmpdir/foo/baz"
+WVPASS WVPASS bup init
+WVPASS WVPASS bup index "$tmpdir/foo"
 WVPASS bup save -n foo "$tmpdir/foo"
 # Make sure the timestamps will differ if metadata isn't being restored.
 WVPASS bup tick
 WVPASS bup restore -C "$tmpdir/restore" "foo/latest/$tmpdir/foo/baz"
 WVPASS "$top/t/compare-trees" "$tmpdir/foo/baz" "$tmpdir/restore/baz"
 
-rm -rf "$tmpdir"
+WVPASS rm -rf "$tmpdir"
+