public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] Platform/Intel/Vlv2TbltDevicePkg: fix postbuild scripts
@ 2019-07-13  3:53 rebecca
  0 siblings, 0 replies; only message in thread
From: rebecca @ 2019-07-13  3:53 UTC (permalink / raw)
  To: devel, Zailiang Sun, Yi Qian, michael.d.kinney; +Cc: Rebecca Cran

Add "set -e" to postbuild scripts to cause them to exit if an error
occurs.

Since GenCapsuleSampleColor.sh is passed arguments, it should be run
directly and not sourced into the environment so it can evaluate $1, $2
etc. Otherwise, it tries to use the toolchain name passed to 'build' as
the GUID string.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 .../Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh   | 10 ++++++----
 .../Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh     |  2 ++
 .../GenerateCapsule/GenCapsuleMinnowMaxRelease.sh      |  2 ++
 .../Capsule/GenerateCapsule/GenCapsuleSampleColor.sh   |  0
 4 files changed, 10 insertions(+), 4 deletions(-)
 mode change 100644 => 100755 Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
index 7b77b50c3f..22ae72c575 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleAll.sh
@@ -1,5 +1,5 @@
 # @file
-#   Linux script file to generate UEFI capsules for system firmware and
+#   *NIX script file to generate UEFI capsules for system firmware and
 #   firmware for sample devices
 #
 # Copyright (c) 2018, Intel Corporation. All rights reserved.<BR>
@@ -7,6 +7,8 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 
+set -e
+
 cd $(dirname $0)
 
 EFI_DIR=$WORKSPACE/Build/Vlv2TbltDevicePkg/${TARGET}_${TOOL_CHAIN_TAG}/X64/
@@ -28,6 +30,6 @@ else
     cp $EFI_DIR/CapsuleApp.efi $CAP_DIR/TestCert/CapsuleAppRelease.efi
     . $SCRIPT_DIR/GenCapsuleMinnowMaxRelease.sh
 fi
-. $SCRIPT_DIR/GenCapsuleSampleColor.sh Blue  149DA854-7D19-4FAA-A91E-862EA1324BE6
-. $SCRIPT_DIR/GenCapsuleSampleColor.sh Green 79179BFD-704D-4C90-9E02-0AB8D968C18A
-. $SCRIPT_DIR/GenCapsuleSampleColor.sh Red   72E2945A-00DA-448E-9AA7-075AD840F9D4
+$SCRIPT_DIR/GenCapsuleSampleColor.sh Blue  149DA854-7D19-4FAA-A91E-862EA1324BE6
+$SCRIPT_DIR/GenCapsuleSampleColor.sh Green 79179BFD-704D-4C90-9E02-0AB8D968C18A
+$SCRIPT_DIR/GenCapsuleSampleColor.sh Red   72E2945A-00DA-448E-9AA7-075AD840F9D4
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
index 114c4a3477..1c9e3613f6 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMax.sh
@@ -6,6 +6,8 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 
+set -e
+
 FMP_CAPSULE_VENDOR=Intel
 FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
 FMP_CAPSULE_FILE=MinnowMax.cap
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
index d2619786e8..e50ef66c03 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleMinnowMaxRelease.sh
@@ -6,6 +6,8 @@
 # SPDX-License-Identifier: BSD-2-Clause-Patent
 #
 
+set -e
+
 FMP_CAPSULE_VENDOR=Intel
 FMP_CAPSULE_GUID=4096267B-DA0A-42EB-B5EB-FEF31D207CB4
 FMP_CAPSULE_FILE=MinnowMaxRelease.cap
diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh b/Platform/Intel/Vlv2TbltDevicePkg/Feature/Capsule/GenerateCapsule/GenCapsuleSampleColor.sh
old mode 100644
new mode 100755
-- 
2.22.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-07-13  3:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-13  3:53 [PATCH] Platform/Intel/Vlv2TbltDevicePkg: fix postbuild scripts rebecca

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox