From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.85.221.68, mailfrom: philmd@redhat.com) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by groups.io with SMTP; Thu, 25 Jul 2019 04:07:08 -0700 Received: by mail-wr1-f68.google.com with SMTP id g17so50318678wrr.5 for ; Thu, 25 Jul 2019 04:07:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7AL5qGsGm2vEjNQQ5s0/dc4yig+SE8IoGlbcAKKfvgc=; b=LNKPBHElTKCbd5tK2YNFCkX2vRyTFpfF8F3uLHekXpK/q+XPmvtpc06HY+Hqu7C9FS A3VKateTuMSX7QZKM31wapvM0i9O6j+ATW7QbUpVYIR1swK8FOcLXOSCDDRGiJmlPRhs Ze9eCb//NSh5MrrT6NnjJ3x72kDBQFk9doSpXKEZcMnBb1+o9/hMGunqnVhv/IMYInfv 29tFrPizaK8ioK1DV4YyRuR47Ouq92e3yEjrd+U974Rh44w2dbBMPn2k1mvZyCWImT4+ L9KuU3Vl3jrXEJeThtIfmFYiffj4RgVoOlJp/6jPPlvrefZHprTCHyi7mRkBtFp3VEKW dB7A== X-Gm-Message-State: APjAAAWeFpaHlLBt2yN7H3QxpFoG17WLUq/JnpEW0oD/FzSsK555VbAP 9r1cluTPvoc9FJkLgdxh709mUQ== X-Google-Smtp-Source: APXvYqzHj8pqKbDk9rAUYoPnGJqyRkM9+Q71a+eu0XTW2SUdOz+Nx5JeKpsODH4aIeYhxWsELdyjVw== X-Received: by 2002:adf:e541:: with SMTP id z1mr5349321wrm.48.1564052824046; Thu, 25 Jul 2019 04:07:04 -0700 (PDT) Return-Path: Received: from [192.168.1.37] (190.red-81-40-121.staticip.rima-tde.net. [81.40.121.190]) by smtp.gmail.com with ESMTPSA id v18sm52966258wrs.80.2019.07.25.04.07.03 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Thu, 25 Jul 2019 04:07:03 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH v2 1/3] OvmfPkg/build.sh: use POSIX 'command -v' instead of 'which'. To: devel@edk2.groups.io, rebecca@bsdio.com, Jordan Justen , Laszlo Ersek , Ard Biesheuvel References: <20190724214405.16162-1-rebecca@bsdio.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <74ba2f2e-0c3c-9fc0-3a20-7e63f5fc97a7@redhat.com> Date: Thu, 25 Jul 2019 13:07:02 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190724214405.16162-1-rebecca@bsdio.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Rebecca, It would be quicker to reply to your series if you use a cover letter. (I'd have replied "series: Reviewed-by" instead of going thru each patch). On 7/24/19 11:44 PM, rebecca@bsdio.com wrote: > 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=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 > Reviewed-by: Philippe Mathieu-Daude