mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-18 17:56:54 +02:00
Initially, I did this,
git grep -l srcdir/test-lib.sh|xargs perl -p0i -e '~180-byte script'
but that line would have been much longer than the maximum permitted
by coreutils' commit hook, and wasn't readable besides, so here's a
more readable version:
lhs=$(printf '%s\\n' \
'if test "$VERBOSE" = yes; then' \
' set -x' \
' touch --version' \
'fi' \
'' \
'. $srcdir/test-lib.sh' \
| sed 's/\$/\\\$/g;s/touch/(\\w+)/')
rhs=$(printf '%s\\n' \
'. "${srcdir=.}/init.sh"; path_prepend_ ../src' \
'test "$VERBOSE" = yes && FIXME --version' \
| sed 's/\$/\\\$/g;s/FIXME/\$1/')
git grep -l srcdir/test-lib.sh|xargs perl -p0i -e "s,$lhs,$rhs,"
10 lines
223 B
Bash
Executable File
10 lines
223 B
Bash
Executable File
#!/bin/sh
|
|
# Make sure touch can operate on a directory.
|
|
# This was broken in the 4.0[efg] test releases.
|
|
|
|
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
|
test "$VERBOSE" = yes && touch --version
|
|
|
|
touch . || fail=1
|
|
Exit $fail
|