X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FBinWrappers%2FPosixLike%2FGenFds;h=bca1bae96af7c625a74d0dbfd6498233a64c3e71;hp=bf5c895b4ffbe4f24faf4abb9c87b1a0ef37cc76;hb=15e20228258c1714cd90207a52101a5b1b54cd2c;hpb=30fdf1140b8d1ce93f3821d986fa165552023440 diff --git a/BaseTools/BinWrappers/PosixLike/GenFds b/BaseTools/BinWrappers/PosixLike/GenFds old mode 100644 new mode 100755 index bf5c895b4f..bca1bae96a --- 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 python2 command is available, use it in preference to python +if command -v python2 >/dev/null 2>&1; then + python_exe=python2 +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 "$@"