From d89f31dc4327e896726e44d9bcfd79c60e9afdc5 Mon Sep 17 00:00:00 2001 From: Kristaps Kaupe Date: Sat, 31 Aug 2019 00:19:49 +0300 Subject: [PATCH] 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 9e1b7d5f0..d148cdf7c 100755 --- a/test/lint/lint-includes.sh +++ b/test/lint/lint-includes.sh @@ -9,6 +9,9 @@ export LC_ALL=C +# 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 "/(leveldb|secp256k1|univalue)/" }