From: Matthias Maier Date: Fri, 15 Jun 2018 05:20:49 +0000 (-0500) Subject: Avoid \0 delimeter X-Git-Tag: v9.1.0-rc1~1031^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ffbd1e02ccbd5aaaa1f0842267802f3a4a9e67ff;p=dealii.git Avoid \0 delimeter We actually do not need any \0 delimeter because '\n' is an invalid character in file names. So, simply switch to '\n' delimeted output. This helps with Mac OS X compatibility because there grep might not have the -z (--null-data) option and can thus not correctly match null terminated input... --- diff --git a/contrib/utilities/indent_common.sh b/contrib/utilities/indent_common.sh index ea44416af2..0d1f209cea 100644 --- a/contrib/utilities/indent_common.sh +++ b/contrib/utilities/indent_common.sh @@ -189,9 +189,9 @@ process_changed() { LAST_MERGE_COMMIT="$(git log --format="%H" --merges --max-count=1 master)" - ( git ls-files -z --others --exclude-standard -- ${1}; - git diff -z --name-only $LAST_MERGE_COMMIT -- ${1} )| - sort -zu | - grep -zE "^${2}$" | - xargs --no-run-if-empty -0 -n 1 -P 10 -I {} bash -c "${3} {}" + ( git ls-files --others --exclude-standard -- ${1}; + git diff --name-only $LAST_MERGE_COMMIT -- ${1} )| + sort -u | + grep -E "^${2}$" | + xargs --no-run-if-empty -d '\n' -n 1 -P 10 -I {} bash -c "${3} {}" }