From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: michael.d.kinney@intel.com) Received: from mga02.intel.com (mga02.intel.com []) by groups.io with SMTP; Wed, 10 Jul 2019 12:05:22 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jul 2019 12:05:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,475,1557212400"; d="scan'208";a="171008202" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.241.98.74]) by orsmga006.jf.intel.com with ESMTP; 10 Jul 2019 12:05:20 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Gary Lin , Zailiang Sun , Yi Qian Subject: [edk2-platforms Patch 18/28] Vlv2TbltDevicePkg/Build_IFWI.sh: Check the WORKSPACE env variable Date: Wed, 10 Jul 2019 12:05:06 -0700 Message-Id: <20190710190516.6012-19-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190710190516.6012-1-michael.d.kinney@intel.com> References: <20190710190516.6012-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Gary Lin Check WORKSPACE before running the script and notify the user to export the variable if the variable doesn't exist Cc: Zailiang Sun Cc: Yi Qian Cc: Michael D Kinney Signed-off-by: Gary Lin --- 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