#!/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 } sources == 1 && $0 == "" { sources = 2; next } tests == 1 && $0 == "" { tests = 2; next } sources == 1 || tests == 1 { print $1 } END { if (sources != 2) { print "Could not find $(sources.js) in Makefile." \ > "/dev/stderr" exit 2 } if (tests != 2) { print "Could not find $(tests.js) in Makefile." \ > "/dev/stderr" exit 2 } } ' Makefile | LANG=POSIX.UTF-8 sort > "$F" git ls-files src/*.js tests/js/*.js | LANG=POSIX.UTF-8 sort | diff -U10 "$F" -