From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: devel@edk2.groups.io, rebecca@bsdio.com,
jordan.l.justen@intel.com, lersek@redhat.com,
ard.biesheuvel@linaro.org
Subject: Re: [edk2-devel] [PATCH] OvmfPkg/build.sh: use POSIX 'command -v' instead of 'which'.
Date: Wed, 24 Jul 2019 14:30:33 +0200 [thread overview]
Message-ID: <eb557723-a5db-07a5-082a-1e14611929bf@redhat.com> (raw)
In-Reply-To: <20190724004947.55202-1-rebecca@bsdio.com>
Hi Rebecca,
On 7/24/19 2:49 AM, rebecca@bsdio.com wrote:
> Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
> ---
> OvmfPkg/build.sh | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh
> index e94aa2a37e..1c28e65404 100755
> --- a/OvmfPkg/build.sh
> +++ b/OvmfPkg/build.sh
> @@ -174,11 +174,11 @@ case $PROCESSOR in
> # The user set the QEMU_COMMAND variable. We'll use it to run QEMU.
> #
> :
> - elif [ -x `which qemu-system-i386` ]; then
> + elif command -v qemu-system-i386; then
> QEMU_COMMAND=qemu-system-i386
> - elif [ -x `which qemu-system-x86_64` ]; then
> + elif command -v qemu-system-x86_64; then
> QEMU_COMMAND=qemu-system-x86_64
> - elif [ -x `which qemu` ]; then
> + elif command -v qemu; then
> QEMU_COMMAND=qemu
> else
> echo Unable to find QEMU for IA32 architecture!
> @@ -242,12 +242,12 @@ FV_DIR=$BUILD_ROOT/FV
> BUILD_ROOT_ARCH=$BUILD_ROOT/$BUILD_ROOT_ARCH
> QEMU_FIRMWARE_DIR=$BUILD_ROOT/QEMU
>
> -if [[ ! -f `which build` || ! -f `which GenFv` ]];
> +if ! command -v build || ! command -v GenFv;
> then
> # build the tools if they don't yet exist. Bin scheme
> echo Building tools as they are not in the path
> make -C $WORKSPACE/BaseTools
> -elif [[ ( -f `which build` || -f `which GenFv` ) && ! -d $EDK_TOOLS_PATH/Source/C/bin ]];
> +elif [[ ( $(command -v build) || $(command -v GenFv) ) && ! -d $EDK_TOOLS_PATH/Source/C/bin ]];
Why add $() ?
> then
> # build the tools if they don't yet exist. BinWrapper scheme
> echo Building tools no $EDK_TOOLS_PATH/Source/C/bin directory
>
next prev parent reply other threads:[~2019-07-24 12:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-24 0:49 [PATCH] OvmfPkg/build.sh: use POSIX 'command -v' instead of 'which' rebecca
2019-07-24 12:30 ` Philippe Mathieu-Daudé [this message]
2019-07-24 14:29 ` [edk2-devel] " rebecca
2019-07-24 21:50 ` rebecca
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=eb557723-a5db-07a5-082a-1e14611929bf@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