When setting an environment variable by piping something into grep, backquotes
can be useful. Also tweak an if case to be more portable.
This commit is contained in:
parent
d1e38c07e6
commit
006fa2d45b
@ -42,9 +42,9 @@ export SKIP=
|
|||||||
|
|
||||||
optional()
|
optional()
|
||||||
{
|
{
|
||||||
option="$OPTIONFLAGS" | egrep "(^|:)$1(:|\$)"
|
option=`echo "$OPTIONFLAGS" | egrep "(^|:)$1(:|\$)"`
|
||||||
# Not set?
|
# Not set?
|
||||||
if [[ -z "$1" || -z "$OPTIONFLAGS" || ${#option} -ne 0 ]]
|
if [ -z "$1" ] || [ -z "$OPTIONFLAGS" ] || [ ${#option} -ne 0 ]
|
||||||
then
|
then
|
||||||
SKIP=""
|
SKIP=""
|
||||||
return
|
return
|
||||||
|
Loading…
x
Reference in New Issue
Block a user