blob: b5a1cb14de1fa16670127197b0604d8b4d70e08b [file] [log] [blame]
bbahnsenb9e16a82006-04-24 16:38:10 +00001#
jljusten000c06d2008-02-12 22:27:42 +00002# Copyright (c) 2006 - 2008, Intel Corporation
bbahnsenb9e16a82006-04-24 16:38:10 +00003# All rights reserved. This program and the accompanying materials
4# are licensed and made available under the terms and conditions of the BSD License
5# which accompanies this distribution. The full text of the license may be found at
6# http://opensource.org/licenses/bsd-license.php
7#
8# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
10
11# Setup the environment for unix-like systems running a bash-like shell.
bbahnsen6dbea972006-11-14 17:57:07 +000012# This file must be "sourced" not merely executed. For example: ". edksetup.sh"
13
14# CYGWIN users: Your path and filename related environment variables should be
15# set up in the unix style. This script will make the necessary conversions to
16# windows style.
bbahnsenb9e16a82006-04-24 16:38:10 +000017
bbahnsen48186272006-07-14 08:02:04 +000018if [ \
jljusten000c06d2008-02-12 22:27:42 +000019 -z "$1" -o \
jljustena3108862007-10-16 20:52:46 +000020 "$1" = "-?" -o \
21 "$1" = "-h" -o \
22 "$1" = "--help" \
23 ]
bbahnsen48186272006-07-14 08:02:04 +000024then
lhauch3a6b4552008-12-31 16:57:24 +000025 echo BaseTools Usage: \'. edksetup.sh\'
jljustena3108862007-10-16 20:52:46 +000026 echo
27 echo Please note: This script must be \'sourced\' so the environment can be changed.
28 echo \(Either \'. edksetup.sh\' or \'source edksetup.sh\'\)
29 return
bbahnsen48186272006-07-14 08:02:04 +000030fi
jljustena3108862007-10-16 20:52:46 +000031
lhauch3a6b4552008-12-31 16:57:24 +000032if [ -z "$WORKSPACE" ]
jljustena3108862007-10-16 20:52:46 +000033then
lhauch3a6b4552008-12-31 16:57:24 +000034 . BaseTools/BuildEnv $*
jljustena3108862007-10-16 20:52:46 +000035else
lhauch3a6b4552008-12-31 16:57:24 +000036 . $WORKSPACE/BaseTools/BuildEnv $*
bbahnsenb9e16a82006-04-24 16:38:10 +000037fi
jljustena3108862007-10-16 20:52:46 +000038
39