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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2019-02-08 07:05:50 +10:30
parent e857229de4
commit 2db84d6653
1 changed files with 1 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
EXIT_CODE=0 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 if ! grep -q 'setup_locale();' "${FILE}"; then
echo "main(...) in ${FILE} does not call setup_locale() (see common/utils.h)" echo "main(...) in ${FILE} does not call setup_locale() (see common/utils.h)"
EXIT_CODE=1 EXIT_CODE=1