aboutsummaryrefslogtreecommitdiff
path: root/test/lint/lint-shell-locale.sh
diff options
context:
space:
mode:
authorpracticalswift <practicalswift@users.noreply.github.com>2018-08-31 00:52:48 +0200
committerpracticalswift <practicalswift@users.noreply.github.com>2018-08-31 00:52:48 +0200
commitec4d57bbb3ddbf760f2c31fec9add33aa19f1b1a (patch)
tree220a2120597581aaf0d477d4c30e7db28d27cd49 /test/lint/lint-shell-locale.sh
parentb57d7d92fe00ff44383e3d01ac15721dd75bde37 (diff)
macOS fix: Work around empty (sub)expression error when using BSD grep
Diffstat (limited to 'test/lint/lint-shell-locale.sh')
-rwxr-xr-xtest/lint/lint-shell-locale.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lint/lint-shell-locale.sh b/test/lint/lint-shell-locale.sh
index efd8081b8c..084dc93f76 100755
--- a/test/lint/lint-shell-locale.sh
+++ b/test/lint/lint-shell-locale.sh
@@ -16,7 +16,7 @@ for SHELL_SCRIPT in $(git ls-files -- "*.sh" | grep -vE "src/(secp256k1|univalue
if grep -q "# This script is intentionally locale dependent by not setting \"export LC_ALL=C\"" "${SHELL_SCRIPT}"; then
continue
fi
- FIRST_NON_COMMENT_LINE=$(grep -vE '^(#.*|)$' "${SHELL_SCRIPT}" | head -1)
+ FIRST_NON_COMMENT_LINE=$(grep -vE '^(#.*)?$' "${SHELL_SCRIPT}" | head -1)
if [[ ${FIRST_NON_COMMENT_LINE} != "export LC_ALL=C" && ${FIRST_NON_COMMENT_LINE} != "export LC_ALL=C.UTF-8" ]]; then
echo "Missing \"export LC_ALL=C\" (to avoid locale dependence) as first non-comment non-empty line in ${SHELL_SCRIPT}"
EXIT_CODE=1