blob: 4821d24fa7edc2d9d8f1a351cf44d4d1891fb0a5 [file] [log] [blame]
Vishal Bhoj82c80712015-12-15 21:13:33 +05301#!/usr/bin/env bash
2#python `dirname $0`/RunToolFromSource.py `basename $0` $*
3#exec `dirname $0`/../../../../C/bin/`basename $0` $*
4
5TOOL_BASENAME=`basename $0`
6
7if [ -n "$WORKSPACE" -a -e $WORKSPACE/Conf/BaseToolsCBinaries ]
8then
9 exec $WORKSPACE/Conf/BaseToolsCBinaries/$TOOL_BASENAME
10elif [ -n "$WORKSPACE" -a -e $EDK_TOOLS_PATH/Source/C ]
11then
12 if [ ! -e $EDK_TOOLS_PATH/Source/C/bin/$TOOL_BASENAME ]
13 then
14 echo BaseTools C Tool binary was not found \($TOOL_BASENAME\)
15 echo You may need to run:
16 echo " make -C $EDK_TOOLS_PATH/Source/C"
17 else
18 exec $EDK_TOOLS_PATH/Source/C/bin/$TOOL_BASENAME $*
19 fi
20elif [ -e `dirname $0`/../../Source/C/bin/$TOOL_BASENAME ]
21then
22 exec `dirname $0`/../../Source/C/bin/$TOOL_BASENAME $*
23else
24 echo Unable to find the real \'$TOOL_BASENAME\' to run
25 echo This message was printed by
26 echo " $0"
27 exit -1
28fi
29