summaryrefslogtreecommitdiff
path: root/tests/assert-deps.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtests/assert-deps.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/assert-deps.sh b/tests/assert-deps.sh
index b125a7c..e358abd 100755
--- a/tests/assert-deps.sh
+++ b/tests/assert-deps.sh
@@ -1,9 +1,17 @@
#!/bin/sh
set -eu
+if [ ! -e .git ]; then
+ echo "Not in a Git repository, skipping \"$0\"." >&2
+ exit
+fi
+
+. tools/lib.sh
+
F="$(mkstemp)"
trap 'rm -f "$F"' EXIT
+
awk '
$0 == "sources.js = \\" { sources = 1; next }
$0 == "tests.js = \\" { tests = 1; next }
@@ -28,6 +36,6 @@ awk '
}
' Makefile | LANG=POSIX.UTF-8 sort > "$F"
-find src/*.js tests/js/*.js |
+git ls-files src/*.js tests/js/*.js |
LANG=POSIX.UTF-8 sort |
diff -U10 "$F" -