From e05d6d58a942d32b26c279be56da80fcddd48e06 Mon Sep 17 00:00:00 2001 From: ChJR Date: Sun, 20 Aug 2017 22:41:05 +0900 Subject: [PATCH] Fixes tox pep8 error in macOS Let's remove xargs GNU Extended option -r, --no-run-if-empty in tox.ini. Change-Id: Ia014da76d51fa538513702560cd86da2bb1ae958 --- tools/check-po.sh | 10 ++++++++++ tox.ini | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 tools/check-po.sh diff --git a/tools/check-po.sh b/tools/check-po.sh new file mode 100755 index 0000000..c9b0d55 --- /dev/null +++ b/tools/check-po.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -e + +FIND_DIRS=${*:-"."} + +find $FIND_DIRS -type f \( -name '*.po' -o -name '*.pot' \) -print0 | \ +while read -r -d '' FILE; do + msgfmt --check-format -o /dev/null "$FILE" +done diff --git a/tox.ini b/tox.ini index 35dce2d..aef5c3e 100644 --- a/tox.ini +++ b/tox.ini @@ -34,7 +34,7 @@ whitelist_externals = [testenv:pep8] commands = flake8 - bash -c "find {toxinidir} -type f \( -name '*.po' -o -name '*.pot' \) -print0 | xargs -0 -n1 --no-run-if-empty msgfmt --check-format -o /dev/null" + bash {toxinidir}/tools/check-po.sh {toxinidir}/doc {toxinidir}/glossary python {toxinidir}/tools/check_yaml_file.py {toxinidir}/tools/zanata/translation_team.yaml bash {toxinidir}/tools/check-zanata-users-list.sh whitelist_externals = bash