]> arthur.barton.de Git - bup.git/blob - t/test-restore-single-file.sh
Include metadata when asked to restore individual non-directory paths.
[bup.git] / t / test-restore-single-file.sh
1 #!/usr/bin/env bash
2 . ./wvtest-bup.sh
3
4 set -e -o pipefail
5
6 WVSTART 'all'
7
8 top="$(pwd)"
9 tmpdir="$(wvmktempdir)"
10 export BUP_DIR="$tmpdir/bup"
11
12 bup() { "$top/bup" "$@"; }
13
14 touch "$tmpdir/foo"
15 WVPASS bup init
16 WVPASS bup index "$tmpdir/foo"
17 WVPASS bup save -n foo "$tmpdir/foo"
18 WVPASS bup tick
19 WVPASS bup restore -C "$tmpdir/restore" "foo/latest/$tmpdir/foo"
20 WVPASS "$top/t/compare-trees" "$tmpdir/foo" "$tmpdir/restore/foo"
21
22 rm -rf "$tmpdir"