public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH v2 1/3] OvmfPkg/build.sh: use POSIX 'command -v' instead of 'which'.
@ 2019-07-24 21:44 rebecca
  2019-07-24 21:44 ` [PATCH v2 2/3] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu rebecca
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: rebecca @ 2019-07-24 21:44 UTC (permalink / raw)
  To: devel, Jordan Justen, Laszlo Ersek, Ard Biesheuvel; +Cc: Rebecca Cran

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 ]];
 then
   # build the tools if they don't yet exist. BinWrapper scheme
   echo Building tools no $EDK_TOOLS_PATH/Source/C/bin directory
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-07-30  5:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-24 21:44 [PATCH v2 1/3] OvmfPkg/build.sh: use POSIX 'command -v' instead of 'which' rebecca
2019-07-24 21:44 ` [PATCH v2 2/3] OvmfPkg/build.sh: use newer '-drive if=pflash' syntax when running qemu rebecca
2019-07-25  2:56   ` Jordan Justen
2019-07-25 11:07   ` [edk2-devel] " Philippe Mathieu-Daudé
2019-07-24 21:44 ` [PATCH v2 3/3] OvmfPkg/build.sh: remove $ADD_QEMU_HDA rebecca
2019-07-24 22:56   ` Jordan Justen
2019-07-30  2:24     ` [edk2-devel] " rebecca
2019-07-30  5:53       ` Jordan Justen
2019-07-25 11:08   ` Philippe Mathieu-Daudé
2019-07-25 11:07 ` [edk2-devel] [PATCH v2 1/3] OvmfPkg/build.sh: use POSIX 'command -v' instead of 'which' Philippe Mathieu-Daudé
2019-07-25 12:45   ` rebecca
2019-07-25 13:36     ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox