From: "Laszlo Ersek" <lersek@redhat.com>
To: Rebecca Cran <rebecca@bsdio.com>,
devel@edk2.groups.io, bob.c.feng@intel.com, liming.gao@intel.com,
leif.lindholm@linaro.org, michael.d.kinney@intel.com,
afish@apple.com
Subject: Re: [PATCH 6/6] edksetup.sh: Add quotes and explicit checks in test statements
Date: Tue, 16 Jul 2019 03:47:29 +0200 [thread overview]
Message-ID: <d7d8d9e1-1b31-4e22-bec9-cd9f3b92faae@redhat.com> (raw)
In-Reply-To: <20190715222516.53254-6-rebecca@bsdio.com>
On 07/16/19 00:25, Rebecca Cran wrote:
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
> edksetup.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/edksetup.sh b/edksetup.sh
> index e2f116f8bc..ba055d5d5a 100755
> --- a/edksetup.sh
> +++ b/edksetup.sh
> @@ -118,7 +118,7 @@ function SetupPython3()
>
> function SetupPython()
> {
> - if [ $PYTHON_COMMAND ] && [ -z $PYTHON3_ENABLE ];then
> + if [ -n "$PYTHON_COMMAND" ] && [ -z "$PYTHON3_ENABLE" ];then
> if ( command -v $PYTHON_COMMAND >/dev/null 2>&1 );then
> return 0
> else
> @@ -127,7 +127,7 @@ function SetupPython()
> fi
> fi
>
> - if [ $PYTHON3_ENABLE ] && [ $PYTHON3_ENABLE == TRUE ]
> + if [ "$PYTHON3_ENABLE" == "TRUE" ]
> then
> SetupPython3
> fi
>
This patch looks sane, but I don't understand why it stops here. There
are more variable references that could be quoted; for example, just
after the above, we have:
if [ $PYTHON3_ENABLE ] && [ $PYTHON3_ENABLE != TRUE ]
Thanks
Laszlo
next prev parent reply other threads:[~2019-07-16 1:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-15 22:25 [PATCH 1/6] edksetup.sh: Use bash variable $PWD instead of executing pwd command rebecca
2019-07-15 22:25 ` [PATCH 2/6] edksetup.sh: Use $SCRIPTNAME consistently instead of 'edksetup.sh' rebecca
2019-07-16 1:39 ` Laszlo Ersek
2019-07-15 22:25 ` [PATCH 3/6] edksetup.sh: when executing arithmetic commands, $ isn't needed rebecca
2019-07-16 1:40 ` Laszlo Ersek
2019-07-15 22:25 ` [PATCH 4/6] edksetup.sh: remove redundant -?, -h and --help in options parsing rebecca
2019-07-16 1:40 ` Laszlo Ersek
2019-07-15 22:25 ` [PATCH 5/6] edksetup.sh: Simplify SetupPython3 and SetupPython functions rebecca
2019-07-16 2:16 ` Laszlo Ersek
2019-07-16 2:27 ` rebecca
2019-07-16 10:38 ` Laszlo Ersek
2019-07-15 22:25 ` [PATCH 6/6] edksetup.sh: Add quotes and explicit checks in test statements rebecca
2019-07-16 1:47 ` Laszlo Ersek [this message]
2019-07-16 1:53 ` Laszlo Ersek
2019-07-16 2:20 ` [edk2-devel] " rebecca
2019-07-16 10:34 ` Laszlo Ersek
2019-07-16 1:37 ` [PATCH 1/6] edksetup.sh: Use bash variable $PWD instead of executing pwd command Laszlo Ersek
2019-07-16 2:13 ` rebecca
2019-07-16 10:32 ` Laszlo Ersek
2019-07-16 10:36 ` Laszlo Ersek
2019-07-16 9:16 ` Leif Lindholm
2019-07-16 11:40 ` Leif Lindholm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d7d8d9e1-1b31-4e22-bec9-cd9f3b92faae@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox