Skip to content

Commit

Permalink
Rollup merge of rust-lang#49272 - semarie:cat-and-grep-gnu, r=alexcri…
Browse files Browse the repository at this point in the history
…chton

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).
  • Loading branch information
frewsxcv committed Mar 23, 2018
2 parents 9e0d0ff + de1c929 commit cb1ffc7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/etc/cat-and-grep.sh
Expand Up @@ -63,6 +63,11 @@ done

shift $((OPTIND - 1))

# use gnu version of tool if available (for bsd)
if command -v "g${GREPPER}"; then
GREPPER="g${GREPPER}"
fi

LOG=$(mktemp -t cgrep.XXXXXX)
trap "rm -f $LOG" EXIT

Expand Down

0 comments on commit cb1ffc7

Please sign in to comment.