Skip to content

Commit bd57bb8

Browse files
authored
Rollup merge of #49272 - semarie:cat-and-grep-gnu, r=alexcrichton
Use GNU version of fgrep/egrep tool if available It is mostly for BSD system. Some tests (run-make/issue-35164 and run-make/cat-and-grep-sanity-check) are failing with BSD fgrep, whereas they pass with gnu version (gfgrep).
2 parents 7936d7d + de1c929 commit bd57bb8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/etc/cat-and-grep.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ done
6363

6464
shift $((OPTIND - 1))
6565

66+
# use gnu version of tool if available (for bsd)
67+
if command -v "g${GREPPER}"; then
68+
GREPPER="g${GREPPER}"
69+
fi
70+
6671
LOG=$(mktemp -t cgrep.XXXXXX)
6772
trap "rm -f $LOG" EXIT
6873

0 commit comments

Comments
 (0)