Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/467#discussion_r23464075
  
    --- Diff: usage/scripts/change-version.sh ---
    @@ -45,16 +47,24 @@ VERSION_MARKER_NL=${VERSION_MARKER}_BELOW
     CURRENT_VERSION=$1
     NEW_VERSION=$2
     
    -# grep --exclude-dir working only in recent versions, not on all 
platforms, replace with find
    -# skip folders named "ignored" or .xxx (but not the current folder ".")
    -# exclude log, war, etc. files
    +# grep --exclude-dir working only in recent versions, not on all 
platforms, replace with find;
    +# skip folders named "ignored" or .xxx (but not the current folder ".");
    +# exclude log, war, etc. files;
    +# use null delimiters so files containing spaces are supported;
    +# pass /dev/null as the first file to search in, so the command doesn't 
fail if find doesn't match any files;
    +# add || true for the case where grep doesn't have matches, so the script 
doesn't halt
    +# If there's an error "Argument list too long" add -n20 to xargs arguments 
and loop over $FILE around sed
     FILES=`find . -type d \( -name ignored -or -name .?\* \) -prune \
    -       -o -type f -not \( -name \*.log -or -name '*.war' -or -name 
'*.min.js' -or -name '*.min.css' \) -print | \
    -       xargs grep -l "${VERSION_MARKER}\|${VERSION_MARKER_NL}"`
    +       -o -type f -not \( -name \*.log -or -name '*.war' -or -name 
'*.min.js' -or -name '*.min.css' \) -print0 | \
    +       xargs -0 grep -l "${VERSION_MARKER}\|${VERSION_MARKER_NL}" 
/dev/null || true`
    +
    +FILES_COUNT=`echo $FILES | wc | awk '{print $2}'`
    --- End diff --
    
    Could use `wc -l` or `wc -w`, rather than having the select the particular 
output. But no strong feelings.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to