diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-02-08 18:10:51 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-02-08 18:10:51 -0500 |
commit | c75db8d0825ff816cb05e9e46b7017b03a6b100d (patch) | |
tree | 3b60b6a54c0e8eee532457e358ff81929a970888 /tests | |
parent | e1f02d2833a7de496e4c148206f421cd664f0d56 (diff) | |
download | libgd-c75db8d0825ff816cb05e9e46b7017b03a6b100d.tar.gz |
scripts: clean up various shellcheck warnings
Should hopefully not break anything :).
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/source/run.sh | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/source/run.sh b/tests/source/run.sh index b1c89eb..1945ae1 100755 --- a/tests/source/run.sh +++ b/tests/source/run.sh @@ -15,11 +15,10 @@ export GIT_PAGER=cat export LC_ALL=C # List all the non-binary files we know about in the tree. -files=".tmp.files" -trap 'rm -f "${files}"' EXIT -git ls-tree -r --name-only HEAD | \ - grep -Ev '\.(bin|bmp|gd|gd2|gif|jpg|jpeg|png|pic|sgi|tga|tiff|ttf|xbm|xpm)$' \ - > "${files}" +read -r -d'\n' -a files < <( + git ls-tree -r --name-only HEAD | \ + grep -Ev '\.(bin|bmp|gd|gd2|gif|jpg|jpeg|png|pic|sgi|tga|tiff|ttf|xbm|xpm)$' +) || : banner() { echo @@ -28,7 +27,7 @@ banner() { do_grep() { # Use -a so UTF-8 files don't get flagged as binary & skipped. - if git grep -aHnE "$@" $(<"${files}") ; then + if git grep -aHnE "$@" "${files[@]}" ; then ret=1 fi } @@ -42,6 +41,6 @@ banner "Check for Windows line endings." do_grep $'\r$' banner "Checking trailing lines." -"${TEST_DIR}"/whitespace.py $(<"${files}") +"${TEST_DIR}"/whitespace.py "${files[@]}" exit ${ret} |