diff options
| author | Sébastien Marie <semarie@users.noreply.github.com> | 2018-03-22 11:27:59 +0100 |
|---|---|---|
| committer | Sébastien Marie <semarie@users.noreply.github.com> | 2018-03-22 14:38:05 +0100 |
| commit | de1c929adaeb5b1e466b6f8485a9f7cf92969185 (patch) | |
| tree | 3ee3c54e2f61a837f57e24520b65cb92ad2543c2 | |
| parent | eb8d08d90415d82beedd42e8c6372568d8582acf (diff) | |
| download | rust-de1c929adaeb5b1e466b6f8485a9f7cf92969185.tar.gz rust-de1c929adaeb5b1e466b6f8485a9f7cf92969185.zip | |
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).
| -rwxr-xr-x | src/etc/cat-and-grep.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/etc/cat-and-grep.sh b/src/etc/cat-and-grep.sh index ef9884d2e98..361e8d8e60e 100755 --- a/src/etc/cat-and-grep.sh +++ b/src/etc/cat-and-grep.sh @@ -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 |
