From 490da639cbd48ce0dc438abbfc89ab796391cb2a Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Sat, 31 Aug 2019 00:19:49 +0300 Subject: Make lint-includes.sh work from any directory --- test/lint/lint-includes.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/lint/lint-includes.sh b/test/lint/lint-includes.sh index 4b9e2615b6..d27e45a23f 100755 --- a/test/lint/lint-includes.sh +++ b/test/lint/lint-includes.sh @@ -11,6 +11,9 @@ export LC_ALL=C IGNORE_REGEXP="/(leveldb|secp256k1|univalue)/" +# cd to root folder of git repo for git ls-files to work properly +cd "$(dirname $0)/../.." || exit 1 + filter_suffix() { git ls-files | grep -E "^src/.*\.${1}"'$' | grep -Ev "${IGNORE_REGEXP}" } -- cgit v1.2.3