Skip to content

Commit 50f83a6

Browse files
authored
Merge pull request #10065 from oech3/md5sum-pl-clap-compat
build-gnu.sh: Let md5sum.pl clap compatible
2 parents 9249539 + 29c777c commit 50f83a6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

util/build-gnu.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,11 +320,9 @@ echo "n_stat1 = \$n_stat1"\n\
320320
echo "n_stat2 = \$n_stat2"\n\
321321
test \$n_stat1 -ge \$n_stat2 \\' tests/ls/stat-free-color.sh
322322

323-
# no need to replicate this output with hashsum
323+
# clap changes the error message. Check exit code only.
324324
"${SED}" -i -e "s|Try 'md5sum --help' for more information.\\\n||" tests/cksum/md5sum.pl
325-
# clap changes the error message
326-
"${SED}" -i '/check-ignore-missing-4/,/EXIT=> 1/ { /ERR=>/,/try_help/d }' tests/cksum/md5sum.pl
327-
325+
"${SED}" -i '/check-ignore-missing-4/,/EXIT/c \ ['\''check-ignore-missing-4'\'', '\''--ignore-missing'\'', {IN=> {f=> '\'''\''}}, {ERR_SUBST=>"s/.*//s"}, {EXIT=> 1}],' tests/cksum/md5sum.pl
328326
# Our ls command always outputs ANSI color codes prepended with a zero. However,
329327
# in the case of GNU, it seems inconsistent. Nevertheless, it looks like it
330328
# doesn't matter whether we prepend a zero or not.

0 commit comments

Comments
 (0)