mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-15 08:23:26 +00:00
simplify
This commit is contained in:
parent
43bcc71d07
commit
6135aff27c
@ -51,10 +51,7 @@ while getopts ':vieh' OPTION; do
|
||||
esac
|
||||
done
|
||||
|
||||
# an utility function to check if a string contains a substring
|
||||
stringContain() { [ -z "$1" ] || { [ -z "${2##*$1*}" ] && [ -n "$2" ];};}
|
||||
|
||||
if ! stringContain 'E' "$GREPFLAGS"
|
||||
if ! echo "$GREPFLAGS" | grep -q E
|
||||
then
|
||||
# use F flag if there is not an E flag
|
||||
GREPFLAGS="F$GREPFLAGS"
|
||||
|
Loading…
Reference in New Issue
Block a user