mirror of
https://github.com/sheumann/hush.git
synced 2024-08-21 11:28:57 +00:00
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()
|
||||
{
|
||||
option="$OPTIONFLAGS" | egrep "(^|:)$1(:|\$)"
|
||||
option=`echo "$OPTIONFLAGS" | egrep "(^|:)$1(:|\$)"`
|
||||
# Not set?
|
||||
if [[ -z "$1" || -z "$OPTIONFLAGS" || ${#option} -ne 0 ]]
|
||||
if [ -z "$1" ] || [ -z "$OPTIONFLAGS" ] || [ ${#option} -ne 0 ]
|
||||
then
|
||||
SKIP=""
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user