public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "G Edhaya Chandran" <edhaya.chandran@arm.com>
To: Grant Likely <Grant.Likely@arm.com>,
	"devel@edk2.groups.io" <devel@edk2.groups.io>,
	Barton Gao <gaojie@byosoft.com.cn>
Cc: nd <nd@arm.com>, Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>
Subject: Re: [edk2-sct PATCH 2/3] edk2-test: use bash 'shift' in build.sh to manage arguments
Date: Mon, 15 Feb 2021 11:45:51 +0000	[thread overview]
Message-ID: <HE1PR0801MB16911E2CFDFDD30205E050B4E8889@HE1PR0801MB1691.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <20210211174605.17937-2-grant.likely@arm.com>

Reviewed-by: G Edhaya Chandran<edhaya.chandran@arm.com>

> -----Original Message-----
> From: Grant Likely <Grant.Likely@arm.com>
> Sent: 11 February 2021 23:16
> To: devel@edk2.groups.io; G Edhaya Chandran <Edhaya.Chandran@arm.com>;
> Barton Gao <gaojie@byosoft.com.cn>
> Cc: nd <nd@arm.com>; Samer El-Haj-Mahmoud <Samer.El-Haj-
> Mahmoud@arm.com>; Grant Likely <Grant.Likely@arm.com>
> Subject: [edk2-sct PATCH 2/3] edk2-test: use bash 'shift' in build.sh to manage
> arguments
> 
> The script was using a big list of numerical argument to pass on extra
> parameters. Use the bash 'shift' command to carve of arguments for the script
> so that $@ can be used for the remainder.
> 
> Signed-off-by: Grant Likely <grant.likely@arm.com>
> ---
>  uefi-sct/SctPkg/build.sh | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/uefi-sct/SctPkg/build.sh b/uefi-sct/SctPkg/build.sh index
> 22cf9667..3b1414ca 100755
> --- a/uefi-sct/SctPkg/build.sh
> +++ b/uefi-sct/SctPkg/build.sh
> @@ -189,13 +189,16 @@ case `uname` in
>     ;;
>  esac
> 
> +# Drop parsed command line arguments
> +shift 2
> +
>  echo "TOOLCHAIN is ${TARGET_TOOLS}"
>  export ${TARGET_TOOLS}_${SCT_TARGET_ARCH}_PREFIX=$CROSS_COMPILE
>  echo "Toolchain prefix:
> ${TARGET_TOOLS}_${SCT_TARGET_ARCH}_PREFIX=$CROSS_COMPILE"
> 
>  SCT_BUILD=DEBUG
> -if [ "$3" = "RELEASE" -o "$3" = "DEBUG" ]; then
> -  SCT_BUILD=$3
> +if [ "$1" = "RELEASE" -o "$1" = "DEBUG" ]; then
> +  SCT_BUILD=$1
>    shift
>  fi
> 
> @@ -254,7 +257,7 @@ cp $EDK_TOOLS_PATH/Source/C/bin/GenBin
> $DEST_DIR/GenBin  #  for DSC in SctPkg/UEFI/UEFI_SCT.dsc
> SctPkg/UEFI/IHV_SCT.dsc $DSC_EXTRA  do
> -	build -p $DSC -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b
> $SCT_BUILD $3 $4 $5 $6 $7 $8 $9
> +	build -p $DSC -a $SCT_TARGET_ARCH -t $TARGET_TOOLS -b
> $SCT_BUILD $@
>  	# Check if there is any error
>  	status=$?
>  	if test $status -ne 0
> --
> 2.20.1


  reply	other threads:[~2021-02-15 11:46 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 17:46 [edk2-sct PATCH 1/3] edk2-test: Add support for building extra packages Grant Likely
2021-02-11 17:46 ` [edk2-sct PATCH 2/3] edk2-test: use bash 'shift' in build.sh to manage arguments Grant Likely
2021-02-15 11:45   ` G Edhaya Chandran [this message]
2021-02-20 16:03   ` Samer El-Haj-Mahmoud
2021-02-22 12:50     ` [edk2-devel] " G Edhaya Chandran
2021-02-11 17:46 ` [edk2-sct PATCH 3/3] edk2-test: Helper script to build SCT+Shell in a bootable format Grant Likely
2021-02-15 12:30   ` G Edhaya Chandran
2021-02-19 18:01     ` Grant Likely
2021-02-19 18:39       ` G Edhaya Chandran
2021-02-22 12:58       ` [edk2-devel] " G Edhaya Chandran
2021-02-20 16:03   ` Samer El-Haj-Mahmoud
2021-02-15 11:43 ` [edk2-sct PATCH 1/3] edk2-test: Add support for building extra packages G Edhaya Chandran
2021-02-20 16:03 ` Samer El-Haj-Mahmoud
2021-02-22 12:17   ` [edk2-devel] " G Edhaya Chandran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=HE1PR0801MB16911E2CFDFDD30205E050B4E8889@HE1PR0801MB1691.eurprd08.prod.outlook.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox