Reviewed-by: G Edhaya Chandran<edhaya.chand...@arm.com> > -----Original Message----- > From: Grant Likely <grant.lik...@arm.com> > Sent: 11 February 2021 23:16 > To: devel@edk2.groups.io; G Edhaya Chandran <edhaya.chand...@arm.com>; > Barton Gao <gao...@byosoft.com.cn> > Cc: nd <n...@arm.com>; Samer El-Haj-Mahmoud <Samer.El-Haj- > mahm...@arm.com>; Grant Likely <grant.lik...@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.lik...@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
-=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#71674): https://edk2.groups.io/g/devel/message/71674 Mute This Topic: https://groups.io/mt/80563675/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-