4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# This program and the accompanying materials
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# are licensed and made available under the terms and conditions of the BSD License
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# which accompanies this distribution. The full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# http://opensource.org/licenses/bsd-license.php
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Setup the environment for unix-like systems running a bash-like shell.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# This file must be "sourced" not merely executed. For example: ". edksetup.sh"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncSetWorkspace() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # If WORKSPACE is already set, then we can return right now
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ -n "$WORKSPACE" ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return 0
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ ! ${BASH_SOURCE[0]} -ef ./BaseTools/BuildEnv ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo Run this script from the base of your tree. For example:
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo " cd /Path/To/Edk/Root"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo " . BaseTools/BuildEnv"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return 1
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # Set $WORKSPACE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync export WORKSPACE=`pwd`
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return 0
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncRestorePreviousConfiguration() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # Restore previous configuration
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PREVIOUS_CONF_FILE=Conf/BuildEnv.sh
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ -e $PREVIOUS_CONF_FILE ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo Loading previous configuration from \$WORKSPACE/$PREVIOUS_CONF_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync . $WORKSPACE/$PREVIOUS_CONF_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncGenerateShellCodeToSetVariable() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VARIABLE=$1
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUTPUT_FILE=$2
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VAR_VALUE="echo \${${VARIABLE}}"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VAR_VALUE=`eval $VAR_VALUE`
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "if [ -z \"\$${VARIABLE}\" ]" >> $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "then" >> $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo " export ${VARIABLE}=${VAR_VALUE}" >> $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "fi" >> $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncGenerateShellCodeToUpdatePath() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUTPUT_FILE=$1
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "if [ -e $EDK_TOOLS_PATH_BIN ]" >> $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "then" >> $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo " if [ "\${PATH/$EDK_TOOLS_PATH_BIN/}" == "\$PATH" ]" >> $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo " then" >> $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo " export PATH=$EDK_TOOLS_PATH_BIN:\$PATH" >> $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo " fi" >> $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "fi" >> $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncStoreCurrentConfiguration() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # Write configuration to a shell script to allow for configuration to be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # easily reloaded.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUTPUT_FILE=Conf/BuildEnv.sh
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #echo Storing current configuration into \$WORKSPACE/$OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync OUTPUT_FILE=$WORKSPACE/$OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "# Auto-generated by ${BASH_SOURCE[0]}" > $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GenerateShellCodeToSetVariable WORKSPACE $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GenerateShellCodeToSetVariable EDK_TOOLS_PATH $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync GenerateShellCodeToUpdatePath $OUTPUT_FILE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncSetEdkToolsPath() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # If EDK_TOOLS_PATH is already set, then we can return right now
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ -n "$EDK_TOOLS_PATH" ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return 0
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # Try $WORKSPACE/Conf/EdkTools
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ -e $WORKSPACE/Conf/EdkTools ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync export EDK_TOOLS_PATH=$WORKSPACE/Conf/EdkTools
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return 0
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # Try $WORKSPACE/Conf/BaseToolsSource
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ -e $WORKSPACE/Conf/BaseToolsSource ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync export EDK_TOOLS_PATH=$WORKSPACE/Conf/BaseToolsSource
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return 0
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # Try $WORKSPACE/BaseTools
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ -e $WORKSPACE/BaseTools ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync export EDK_TOOLS_PATH=$WORKSPACE/BaseTools
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return 0
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "Unable to determine EDK_TOOLS_PATH"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "You may need to download the 'BaseTools' from buildtools.tianocore.org."
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "After downloading, either create a symbolic link to the source at"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "\$WORKSPACE/Conf/BaseToolsSource, or set the EDK_TOOLS_PATH environment"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "variable."
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncGetBaseToolsBinSubDir() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # Figure out a uniq directory name from the uname command
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync UNAME_DIRNAME=`uname -sm`
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync UNAME_DIRNAME=${UNAME_DIRNAME// /-}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync UNAME_DIRNAME=${UNAME_DIRNAME//\//-}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo $UNAME_DIRNAME
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncGetEdkToolsPathBinDirectory() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # Figure out a uniq directory name from the uname command
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BIN_SUB_DIR=`GetBaseToolsBinSubDir`
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ -e $EDK_TOOLS_PATH/BinWrappers/$BIN_SUB_DIR ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync EDK_TOOLS_PATH_BIN=$EDK_TOOLS_PATH/BinWrappers/$BIN_SUB_DIR
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync else
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync EDK_TOOLS_PATH_BIN=$EDK_TOOLS_PATH/Bin/$BIN_SUB_DIR
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo $EDK_TOOLS_PATH_BIN
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncAddDirToStartOfPath() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DIRNAME=$1
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PATH=$DIRNAME:$DIRNAME:$DIRNAME:$PATH
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PATH=${PATH//$DIRNAME:/}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PATH=$DIRNAME:$PATH
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync export PATH
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncAddEdkToolsToPath() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync # If EDK_TOOLS_PATH is not set, then we cannot update PATH
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync #
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ -z "$EDK_TOOLS_PATH" ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return 1
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync EDK_TOOLS_PATH_BIN=`GetEdkToolsPathBinDirectory`
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync AddDirToStartOfPath $EDK_TOOLS_PATH_BIN
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCopySingleTemplateFile() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SRC_FILENAME=Conf/$1.template
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DST_FILENAME=Conf/$1.txt
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ -e $WORKSPACE/$DST_FILENAME ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "Copying \$EDK_TOOLS_PATH/$SRC_FILENAME"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo " to \$WORKSPACE/$DST_FILENAME"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SRC_FILENAME=$EDK_TOOLS_PATH/$SRC_FILENAME
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync DST_FILENAME=$WORKSPACE/$DST_FILENAME
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync cp $SRC_FILENAME $DST_FILENAME
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCopyTemplateFiles() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CopySingleTemplateFile build_rule
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CopySingleTemplateFile tools_def
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CopySingleTemplateFile target
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncScriptMain() {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SetWorkspace
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ -z $WORKSPACE ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "Failure setting WORKSPACE"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return 1
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync RestorePreviousConfiguration
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync SetEdkToolsPath
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ -z $EDK_TOOLS_PATH ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return 1
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync AddEdkToolsToPath
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if [ $? -ne 0 ]
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo "Failure adding EDK Tools into PATH!"
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return 1
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync fi
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync StoreCurrentConfiguration
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo WORKSPACE: $WORKSPACE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync echo EDK_TOOLS_PATH: $EDK_TOOLS_PATH
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync CopyTemplateFiles
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync}
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync# Run the main function
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync#
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncScriptMain
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync