# Setup the environment for unix-like systems running a bash-like shell.
# This file must be "sourced" not merely executed. For example: ". edksetup.sh"
#
-# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
# Copyright (c) 2016, Linaro Ltd. All rights reserved.<BR>
-# This program and the accompanying materials
-# are licensed and made available under the terms and conditions of the BSD License
-# which accompanies this distribution. The full text of the license may be found at
-# http://opensource.org/licenses/bsd-license.php
-#
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+# SPDX-License-Identifier: BSD-2-Clause-Patent
#
SetWorkspace() {
export CONF_PATH=$WORKSPACE/Conf
if [ ! -d $WORKSPACE/Conf ] && [ -n "$PACKAGES_PATH" ]
then
- PACKAGES_PATH=${PACKAGES_PATH//:/ }
- for DIR in $PACKAGES_PATH
+ PATH_LIST=${PACKAGES_PATH//:/ }
+ for DIR in $PATH_LIST
do
if [ -d $DIR/Conf ]
then
#
OUTPUT_FILE=$CONF_PATH/BuildEnv.sh
#echo Storing current configuration into $OUTPUT_FILE
- echo "# Auto-generated by ${BASH_SOURCE[0]}" > $OUTPUT_FILE
+ echo "# Auto-generated by ${BASH_SOURCE[0]}" >| $OUTPUT_FILE
GenerateShellCodeToSetVariable WORKSPACE $OUTPUT_FILE
GenerateShellCodeToSetVariable EDK_TOOLS_PATH $OUTPUT_FILE
GenerateShellCodeToUpdatePath $OUTPUT_FILE
#
if [ -n "$PACKAGES_PATH"]
then
- PACKAGES_PATH=${PACKAGES_PATH//:/ }
- for DIR in $PACKAGES_PATH
+ PATH_LIST=${PACKAGES_PATH//:/ }
+ for DIR in $PATH_LIST
do
if [ -d $DIR/BaseTools ]
then