diff options
Diffstat (limited to 'tests/assert-install.sh')
-rwxr-xr-x | tests/assert-install.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/assert-install.sh b/tests/assert-install.sh index 65080df..b10c037 100755 --- a/tests/assert-install.sh +++ b/tests/assert-install.sh @@ -1,17 +1,28 @@ #!/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 PATH="$D/usr/bin:$PATH" NODE_PATH="$D/usr/lib/node:$NODE_PATH" { + make -s DESTDIR="$D" install + printf '%s: that the papo(3js) library is installed correctly...' \ "$(yellow "$0")" node -e 'require("papo");' |