[edk2-devel] [edk2-platforms Patch 18/28] Vlv2TbltDevicePkg/Build_IFWI.sh: Check the WORKSPACE env variable

Michael D Kinney posted 28 patches 6 years, 7 months ago
[edk2-devel] [edk2-platforms Patch 18/28] Vlv2TbltDevicePkg/Build_IFWI.sh: Check the WORKSPACE env variable
Posted by Michael D Kinney 6 years, 7 months ago
From: Gary Lin <glin@suse.com>

Check WORKSPACE before running the script and notify the user to export
the variable if the variable doesn't exist

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
---
 Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
index f8954cc9cd..422e90ca6c 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
@@ -6,7 +6,7 @@ function Usage ( ) {
   echo
   echo "Script to build BIOS firmware and stitch the entire IFWI."
   echo
-  echo "Usage: Build_IFWI.bat [options]  PlatformType  BuildTarget  "
+  echo "Usage: Build_IFWI.sh [options]  PlatformType  BuildTarget  "
   echo
   echo 
   echo "       /yL [option]  :   Enable SPI lock"
@@ -28,6 +28,18 @@ Stitch_Flags=
 Arch=X64
 PLATFORM_PACKAGE=Vlv2TbltDevicePkg
 
+## Check whether WORKSPACE is set or not
+if [[ -z "$WORKSPACE" ]]; then
+  echo "Please export WORKSPACE before running Build_IFWI.sh"
+  echo "See the details in Readme.md"
+  exit 1
+fi
+
+## Create $WORKSPACE/Conf if necessary
+if [ ! -d $WORKSPACE/Conf ]; then
+  mkdir $WORKSPACE/Conf
+fi
+
 ## Parse Optional arguments
 if [ "$1" == "/?" ]; then
   Usage
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43512): https://edk2.groups.io/g/devel/message/43512
Mute This Topic: https://groups.io/mt/32419745/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [edk2-platforms Patch 18/28] Vlv2TbltDevicePkg/Build_IFWI.sh: Check the WORKSPACE env variable
Posted by Sun, Zailiang 6 years, 7 months ago
Reviewed-By: Zailiang Sun <zailiang.sun@intel.com>

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, July 11, 2019 3:05 AM
To: devel@edk2.groups.io
Cc: Gary Lin <glin@suse.com>; Sun, Zailiang <zailiang.sun@intel.com>; Qian, Yi <yi.qian@intel.com>
Subject: [edk2-platforms Patch 18/28] Vlv2TbltDevicePkg/Build_IFWI.sh: Check the WORKSPACE env variable

From: Gary Lin <glin@suse.com>

Check WORKSPACE before running the script and notify the user to export the variable if the variable doesn't exist

Cc: Zailiang Sun <zailiang.sun@intel.com>
Cc: Yi Qian <yi.qian@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Signed-off-by: Gary Lin <glin@suse.com>
---
 Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
index f8954cc9cd..422e90ca6c 100755
--- a/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
+++ b/Platform/Intel/Vlv2TbltDevicePkg/Build_IFWI.sh
@@ -6,7 +6,7 @@ function Usage ( ) {
   echo
   echo "Script to build BIOS firmware and stitch the entire IFWI."
   echo
-  echo "Usage: Build_IFWI.bat [options]  PlatformType  BuildTarget  "
+  echo "Usage: Build_IFWI.sh [options]  PlatformType  BuildTarget  "
   echo
   echo 
   echo "       /yL [option]  :   Enable SPI lock"
@@ -28,6 +28,18 @@ Stitch_Flags=
 Arch=X64
 PLATFORM_PACKAGE=Vlv2TbltDevicePkg
 
+## Check whether WORKSPACE is set or not if [[ -z "$WORKSPACE" ]]; then
+  echo "Please export WORKSPACE before running Build_IFWI.sh"
+  echo "See the details in Readme.md"
+  exit 1
+fi
+
+## Create $WORKSPACE/Conf if necessary
+if [ ! -d $WORKSPACE/Conf ]; then
+  mkdir $WORKSPACE/Conf
+fi
+
 ## Parse Optional arguments
 if [ "$1" == "/?" ]; then
   Usage
--
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43634): https://edk2.groups.io/g/devel/message/43634
Mute This Topic: https://groups.io/mt/32419745/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-