From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=none, err=permanent DNS error (domain: bsdio.com, ip: 65.103.231.193, mailfrom: rebecca@bsdio.com) Received: from muon.bsdio.com (muon.bsdio.com [65.103.231.193]) by groups.io with SMTP; Tue, 23 Jul 2019 17:50:10 -0700 Received: from muon.bsdio.com (localhost [127.0.0.1]) by muon.bsdio.com (Postfix) with ESMTP id 44ED98985C; Tue, 23 Jul 2019 18:50:31 -0600 (MDT) Received: from muon.bsdio.com ([127.0.0.1]) by muon.bsdio.com (muon.bsdio.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 82zOvHUgCd2m; Tue, 23 Jul 2019 18:50:29 -0600 (MDT) Received: from photon.int.bluestop.org (unknown [10.0.10.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by muon.bsdio.com (Postfix) with ESMTPSA; Tue, 23 Jul 2019 18:50:29 -0600 (MDT) From: rebecca@bsdio.com To: devel@edk2.groups.io, jordan.l.justen@intel.com, lersek@redhat.com, ard.biesheuvel@linaro.org Cc: Rebecca Cran Subject: [PATCH] OvmfPkg/build.sh: use POSIX 'command -v' instead of 'which'. Date: Tue, 23 Jul 2019 18:49:47 -0600 Message-Id: <20190724004947.55202-1-rebecca@bsdio.com> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Signed-off-by: Rebecca Cran --- 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=3Dqemu-system-i386 - elif [ -x `which qemu-system-x86_64` ]; then + elif command -v qemu-system-x86_64; then QEMU_COMMAND=3Dqemu-system-x86_64 - elif [ -x `which qemu` ]; then + elif command -v qemu; then QEMU_COMMAND=3Dqemu else echo Unable to find QEMU for IA32 architecture! @@ -242,12 +242,12 @@ FV_DIR=3D$BUILD_ROOT/FV BUILD_ROOT_ARCH=3D$BUILD_ROOT/$BUILD_ROOT_ARCH QEMU_FIRMWARE_DIR=3D$BUILD_ROOT/QEMU =20 -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_P= ATH/Source/C/bin ]]; +elif [[ ( $(command -v build) || $(command -v GenFv) ) && ! -d $EDK_TOOL= S_PATH/Source/C/bin ]]; then # build the tools if they don't yet exist. BinWrapper scheme echo Building tools no $EDK_TOOLS_PATH/Source/C/bin directory --=20 2.22.0