mirror of
https://git.busybox.net/busybox
synced 2026-01-31 16:43:21 +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
1 changed files with 2 additions and 2 deletions
|
|
@ -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 a new issue