X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fetc%2Fcat-and-grep.sh;h=77dc52a9350706dd3cb7d7b1763b43c03b95ee1f;hb=80a65bcaf2f2b8a5c659b21b32b42bc300338a0e;hp=ef9884d2e980d45d70b0da9446f92969479f01b8;hpb=c7b6d8263b0c106503d102ab8148769ac9f7d086;p=rust.git diff --git a/src/etc/cat-and-grep.sh b/src/etc/cat-and-grep.sh index ef9884d2e98..77dc52a9350 100755 --- a/src/etc/cat-and-grep.sh +++ b/src/etc/cat-and-grep.sh @@ -1,16 +1,6 @@ #!/bin/sh set -eu -# Copyright 2017 The Rust Project Developers. See the COPYRIGHT -# file at the top-level directory of this distribution and at -# http://rust-lang.org/COPYRIGHT. -# -# Licensed under the Apache License, Version 2.0 or the MIT license -# , at your -# option. This file may not be copied, modified, or distributed -# except according to those terms. - # Performs `cat` and `grep` simultaneously for `run-make` tests in the Rust CI. # # This program will read lines from stdin and print them to stdout immediately. @@ -63,6 +53,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