tests/invocation: Use ggrep if available
We use grep -o here to filter output, but that's not available on OpenIndiana. It does offer "ggrep" though, which is GNU grep.
This commit is contained in:
parent
c1d042051c
commit
2614deb138
@ -139,7 +139,13 @@ filter() {
|
||||
if [ -f "$1" ] ; then
|
||||
# grep '-o', '-E' and '-f' are supported by the tools in modern GNU
|
||||
# environments, and on OS X.
|
||||
grep -oE -f "$1"
|
||||
#
|
||||
# But not on OpenIndiana/Illumos, so we use ggrep if available.
|
||||
if command -v ggrep >/dev/null 2>&1; then
|
||||
ggrep -oE -f "$1"
|
||||
else
|
||||
grep -oE -f "$1"
|
||||
fi
|
||||
else
|
||||
cat
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user