]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/BinWrappers/PosixLike/FCE
BaseTools/FCE: Add a tool FCE
[mirror_edk2.git] / BaseTools / BinWrappers / PosixLike / FCE
CommitLineData
3c59d946
SZ
1#!/usr/bin/env bash\r
2\r
3full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here\r
4dir=$(dirname "$full_cmd")\r
5cmd=${full_cmd##*/}\r
6\r
7if [ -n "$WORKSPACE" ] && [ -e "$WORKSPACE/Conf/BaseToolsCBinaries" ]\r
8then\r
9 exec "$WORKSPACE/Conf/BaseToolsCBinaries/$cmd"\r
10elif [ -n "$WORKSPACE" ] && [ -e "$EDK_TOOLS_PATH/Source/C" ]\r
11then\r
12 if [ ! -e "$EDK_TOOLS_PATH/Source/C/bin/$cmd" ]\r
13 then\r
14 echo "BaseTools C Tool binary was not found ($cmd)"\r
15 echo "You may need to run:"\r
16 echo " make -C $EDK_TOOLS_PATH/Source/C"\r
17 else\r
18 exec "$EDK_TOOLS_PATH/Source/C/bin/$cmd" "$@"\r
19 fi\r
20elif [ -e "$dir/../../Source/C/bin/$cmd" ]\r
21then\r
22 exec "$dir/../../Source/C/bin/$cmd" "$@"\r
23else\r
24 echo "Unable to find the real '$cmd' to run"\r
25 echo "This message was printed by"\r
26 echo " $0"\r
27 exit 127\r
28fi\r
29\r