From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Mon, 22 Jul 2019 15:16:33 -0700 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 17A54308427C; Mon, 22 Jul 2019 22:16:33 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-117-23.ams2.redhat.com [10.36.117.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4727B5D721; Mon, 22 Jul 2019 22:16:31 +0000 (UTC) Subject: Re: [edk2-devel] [PATCH v4 1/6] edksetup.sh: Use bash variable $PWD instead of executing pwd command To: devel@edk2.groups.io, rebecca@bsdio.com, bob.c.feng@intel.com, liming.gao@intel.com, michael.d.kinney@intel.com, afish@apple.com, zhijux.fan@intel.com, leif.lindholm@linaro.org References: <20190716165538.57960-1-rebecca@bsdio.com> From: "Laszlo Ersek" Message-ID: <19dbcb9a-bb46-2d42-a668-68a31182c1ca@redhat.com> Date: Tue, 23 Jul 2019 00:16:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20190716165538.57960-1-rebecca@bsdio.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 22 Jul 2019 22:16:33 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi All, On 07/16/19 18:55, rebecca@bsdio.com wrote: > This is a (very minor) optimization: `pwd` runs the command (even as a > built-in), whereas $PWD simply evaluates the value of the variable. > > ALso, modern scripts should generally use $(...) to run commands, > instead of `...`. > > Signed-off-by: Rebecca Cran > Reviewed-by: Laszlo Ersek > Reviewed-by: Leif Lindholm > --- > edksetup.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/edksetup.sh b/edksetup.sh > index 12a3e26a67..ab58fe4a6e 100755 > --- a/edksetup.sh > +++ b/edksetup.sh > @@ -71,7 +71,7 @@ function SetWorkspace() > # > # Set $WORKSPACE > # > - export WORKSPACE=`pwd` > + export WORKSPACE=$PWD > return 0 > } > > should we push patches #1 through #4 from this series? They are independent of python detection (which is still being discussed). Thanks Laszlo