X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=BaseTools%2FBinWrappers%2FPosixLike%2FGenFds;h=e9f570b52cef8f72ba0f691739f4f73e96a81405;hb=9c2d68c0a29909d23266395fc48d0b81b118e341;hp=bf5c895b4ffbe4f24faf4abb9c87b1a0ef37cc76;hpb=30fdf1140b8d1ce93f3821d986fa165552023440;p=mirror_edk2.git diff --git a/BaseTools/BinWrappers/PosixLike/GenFds b/BaseTools/BinWrappers/PosixLike/GenFds old mode 100644 new mode 100755 index bf5c895b4f..e9f570b52c --- a/BaseTools/BinWrappers/PosixLike/GenFds +++ b/BaseTools/BinWrappers/PosixLike/GenFds @@ -1 +1,14 @@ -link RunToolFromSource \ No newline at end of file +#!/usr/bin/env bash +#python `dirname $0`/RunToolFromSource.py `basename $0` $* + +# If a ${PYTHON} command is available, use it in preference to python +if command -v ${PYTHON} >/dev/null 2>&1; then + python_exe=${PYTHON} +fi + +full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here +dir=$(dirname "$full_cmd") +cmd=${full_cmd##*/} + +export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}" +exec "${python_exe:-python}" -m $cmd.$cmd "$@"