config: add $egrep
Introduce a new variable set in $PLAN9/config: $egrep, which is conditionally set to either `egrep` or `grep -E`, based on platform, and use this when we want to invoke `egrep`. This works around the endless warnings from GNU grep stating that `egrep` is deprecated in favor of `grep -E`, when run on e.g. Linux.
This commit is contained in:
4
bin/9l
4
bin/9l
@@ -146,7 +146,7 @@ then
|
||||
grep '__p9l_autolib_[a-zA-Z0-9+-]*' |
|
||||
sed 's/.*__p9l_autolib_//; s/:.*//' |
|
||||
sort -u |
|
||||
egrep -v '^(thread|draw)$'
|
||||
$egrep -v '^(thread|draw)$'
|
||||
`
|
||||
a="$a $b"
|
||||
done
|
||||
@@ -337,7 +337,7 @@ quiet()
|
||||
ignore=$ignore'|ld: warning: ignoring duplicate libraries:'
|
||||
|
||||
sed 's/.*: In function `[^:]*: *//' "$1" |
|
||||
egrep -v "$ignore"
|
||||
$egrep -v "$ignore"
|
||||
}
|
||||
|
||||
# Must use temp file to avoid pipe; pipe loses status.
|
||||
|
||||
Reference in New Issue
Block a user