From 2db84d6653cf25699c38e875d9419052e4450e2c Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 8 Feb 2019 07:05:50 +1030 Subject: [PATCH] tools/check-setup_locale.sh: don't get caught by main in non-C files. We're about to put one in configure. Signed-off-by: Rusty Russell --- tools/check-setup_locale.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check-setup_locale.sh b/tools/check-setup_locale.sh index c89a564dd..39d87b33f 100755 --- a/tools/check-setup_locale.sh +++ b/tools/check-setup_locale.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash EXIT_CODE=0 -for FILE in $(git grep -lE 'int main\(' | grep -vE '^ccan/'); do +for FILE in $(git grep -lE 'int main\(' | grep -vE '^ccan/' | grep '.c$'); do if ! grep -q 'setup_locale();' "${FILE}"; then echo "main(...) in ${FILE} does not call setup_locale() (see common/utils.h)" EXIT_CODE=1