tests: convert the multi-prog $VERBOSE/--version uses
E.g.,
-test "$VERBOSE" = yes && { env -- pwd --version; readlink --version; }
+print_ver_ pwd readlink
-test "$VERBOSE" = yes && { stdbuf --version; mv --version; }
+print_ver_ stdbuf mv
Use this command:
git grep -l 'VERBOSE.*--version'|xargs perl -ni \
-e '/^test "\$VERBOSE" = yes && { .*--version/ or print,next;' \
-e 's/env -- //g;' \
-e 's/test "\$VERBOSE" = yes && { /print_ver_ /;' \
-e ' s/(\w+) --version;/$1/g; s/ *}$//; print'
17 files changed: