[edk2-devel] [PATCH v4 1/6] edksetup.sh: Use bash variable $PWD instead of executing pwd command
Liming Gao
liming.gao at intel.com
Wed Jul 17 02:56:49 UTC 2019
Rebecca:
The change is good. Reviewed-by: Liming Gao <liming.gao at intel.com> for 1-4, and 6.
For patch 5, I see Leif sends another version update. I will give the comments on his change.
Thanks
Liming
> -----Original Message-----
> From: Rebecca Cran [mailto:rebecca at bsdio.com]
> Sent: Wednesday, July 17, 2019 12:56 AM
> To: devel at edk2.groups.io; lersek at redhat.com; Feng, Bob C <bob.c.feng at intel.com>; Gao, Liming <liming.gao at intel.com>; Kinney,
> Michael D <michael.d.kinney at intel.com>; afish at apple.com; Fan, ZhijuX <zhijux.fan at intel.com>; leif.lindholm at linaro.org
> Cc: Rebecca Cran <rebecca at bsdio.com>
> Subject: [PATCH v4 1/6] edksetup.sh: Use bash variable $PWD instead of executing pwd command
>
> 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 <rebecca at bsdio.com>
> Reviewed-by: Laszlo Ersek <lersek at redhat.com>
> Reviewed-by: Leif Lindholm <leif.lindholm at linaro.org>
> ---
> 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
> }
>
> --
> 2.22.0
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#43834): https://edk2.groups.io/g/devel/message/43834
Mute This Topic: https://groups.io/mt/32493796/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list