]> git.lizzy.rs Git - rust.git/blobdiff - src/etc/cat-and-grep.sh
Do not ICE on multipart suggestions touching multiple files
[rust.git] / src / etc / cat-and-grep.sh
index ef9884d2e980d45d70b0da9446f92969479f01b8..77dc52a9350706dd3cb7d7b1763b43c03b95ee1f 100755 (executable)
@@ -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 <LICENSE-APACHE or
-# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-# <LICENSE-MIT or http://opensource.org/licenses/MIT>, 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