bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 1 | # |
jljusten | 000c06d | 2008-02-12 22:27:42 +0000 | [diff] [blame] | 2 | # Copyright (c) 2006 - 2008, Intel Corporation |
bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 3 | # 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. |
bbahnsen | 6dbea97 | 2006-11-14 17:57:07 +0000 | [diff] [blame] | 12 | # 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. |
bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 17 | |
bbahnsen | 4818627 | 2006-07-14 08:02:04 +0000 | [diff] [blame] | 18 | if [ \ |
jljusten | 000c06d | 2008-02-12 22:27:42 +0000 | [diff] [blame] | 19 | -z "$1" -o \ |
jljusten | a310886 | 2007-10-16 20:52:46 +0000 | [diff] [blame] | 20 | "$1" = "-?" -o \ |
| 21 | "$1" = "-h" -o \ |
| 22 | "$1" = "--help" \ |
| 23 | ] |
bbahnsen | 4818627 | 2006-07-14 08:02:04 +0000 | [diff] [blame] | 24 | then |
lhauch | 3a6b455 | 2008-12-31 16:57:24 +0000 | [diff] [blame] | 25 | echo BaseTools Usage: \'. edksetup.sh\' |
jljusten | a310886 | 2007-10-16 20:52:46 +0000 | [diff] [blame] | 26 | 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 |
bbahnsen | 4818627 | 2006-07-14 08:02:04 +0000 | [diff] [blame] | 30 | fi |
jljusten | a310886 | 2007-10-16 20:52:46 +0000 | [diff] [blame] | 31 | |
lhauch | 3a6b455 | 2008-12-31 16:57:24 +0000 | [diff] [blame] | 32 | if [ -z "$WORKSPACE" ] |
jljusten | a310886 | 2007-10-16 20:52:46 +0000 | [diff] [blame] | 33 | then |
lhauch | 3a6b455 | 2008-12-31 16:57:24 +0000 | [diff] [blame] | 34 | . BaseTools/BuildEnv $* |
jljusten | a310886 | 2007-10-16 20:52:46 +0000 | [diff] [blame] | 35 | else |
lhauch | 3a6b455 | 2008-12-31 16:57:24 +0000 | [diff] [blame] | 36 | . $WORKSPACE/BaseTools/BuildEnv $* |
bbahnsen | b9e16a8 | 2006-04-24 16:38:10 +0000 | [diff] [blame] | 37 | fi |
jljusten | a310886 | 2007-10-16 20:52:46 +0000 | [diff] [blame] | 38 | |
| 39 | |