diff options
author | Kristaps Kaupe <kristaps@blogiem.lv> | 2019-08-31 00:19:49 +0300 |
---|---|---|
committer | Kristaps Kaupe <kristaps@blogiem.lv> | 2019-09-04 22:36:09 +0300 |
commit | 490da639cbd48ce0dc438abbfc89ab796391cb2a (patch) | |
tree | 3149798094d902c24efe00cb8f17fddca78d9caa /test/lint | |
parent | f5db3f2128f0b293432a5a36cb0314b501019a06 (diff) |
Make lint-includes.sh work from any directory
Diffstat (limited to 'test/lint')
-rwxr-xr-x | test/lint/lint-includes.sh | 3 |
1 files changed, 3 insertions, 0 deletions
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}" } |