From 86c37538d71e2937386ae89089191018231c7998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Chavant?= Date: Mon, 4 Dec 2017 18:29:55 +0100 Subject: [PATCH] Simply search for shell scripts to search Use 2 simpler find commands and redirect the output to a temporary file. --- scripts/dev/ci/travis_run.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/dev/ci/travis_run.sh b/scripts/dev/ci/travis_run.sh index c0f59dc1a..b7d44968e 100644 --- a/scripts/dev/ci/travis_run.sh +++ b/scripts/dev/ci/travis_run.sh @@ -15,11 +15,11 @@ elif [[ $TESTENV == eslint ]]; then cd qutebrowser/javascript || exit 1 eslint --color --report-unused-disable-directives . elif [[ $TESTENV == shellcheck ]]; then - dev_scripts=$( find scripts/dev/ -name '*.sh' -print0 | xargs -0 ) - # false positive: we are using 'find -exec +' - # shellcheck disable=SC2038 - userscripts=$( find misc/userscripts/ -type f -exec grep -lE '[/ ][bd]ash$|[/ ]sh$|[/ ]ksh$' {} + | xargs ) - IFS=" " read -r -a scripts <<< "$dev_scripts $userscripts" + SCRIPTS=$( mktemp ) + find scripts/dev/ -name '*.sh' >"$SCRIPTS" + find misc/userscripts/ -type f -exec grep -lE '[/ ][bd]ash$|[/ ]sh$|[/ ]ksh$' {} + >>"$SCRIPTS" + mapfile -t scripts <"$SCRIPTS" + rm -f "$SCRIPTS" docker run \ -v "$PWD:/outside" \ -w /outside \