diff options
Diffstat (limited to 'tests/assert-uninstall.sh')
-rwxr-xr-x | tests/assert-uninstall.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/assert-uninstall.sh b/tests/assert-uninstall.sh index 82fc86f..0f85a60 100755 --- a/tests/assert-uninstall.sh +++ b/tests/assert-uninstall.sh @@ -1,10 +1,21 @@ #!/bin/sh set -eu +if [ ! -e .git ]; then + echo "Not in a Git repository, skipping \"$0\"." >&2 + exit +fi + + . tools/lib.sh D="$(mkdtemp)" -trap 'rm -rf "$D"' EXIT +R="$(mkdtemp)" +trap 'rm -rf "$D" "$R"' EXIT + +git clone -q --depth=1 file://"$PWD" "$R" +cd "$R" + { make -s DESTDIR="$D" install |