summaryrefslogtreecommitdiffstats
path: root/BaseTools/BinPipWrappers/PosixLike/GenFds
diff options
context:
space:
mode:
authorMatthew Carlson <matthewfcarlson@gmail.com>2021-02-09 08:50:33 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-02-09 03:56:37 +0000
commit1534b6228b0932d745bf6ec9fd4cb010800b92f2 (patch)
tree72fff77178550a5f65df459f1b639a09efa499f9 /BaseTools/BinPipWrappers/PosixLike/GenFds
parentecc267fec55aecd9e36bf80caba732d5121a3428 (diff)
downloadedk2-1534b6228b0932d745bf6ec9fd4cb010800b92f2.tar.gz
edk2-1534b6228b0932d745bf6ec9fd4cb010800b92f2.tar.bz2
edk2-1534b6228b0932d745bf6ec9fd4cb010800b92f2.zip
BaseTools: Use pip module if available, CI uses it by default
Use the new edk2-basetools pip module. Includes a helpful message in setup to let users know which has been selected. Cc: Bob Feng <bob.c.feng@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Yuwei Chen <yuwei.chen@intel.com> Reviewed-by: Bob Feng <bob.c.feng@intel.com> Reviewed-by: Yuwei <Chen<yuwei.chen@intel.com> Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
Diffstat (limited to 'BaseTools/BinPipWrappers/PosixLike/GenFds')
-rwxr-xr-xBaseTools/BinPipWrappers/PosixLike/GenFds12
1 files changed, 12 insertions, 0 deletions
diff --git a/BaseTools/BinPipWrappers/PosixLike/GenFds b/BaseTools/BinPipWrappers/PosixLike/GenFds
new file mode 100755
index 0000000000..b27e84eaa2
--- /dev/null
+++ b/BaseTools/BinPipWrappers/PosixLike/GenFds
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+#python `dirname $0`/RunToolFromSource.py `basename $0` $*
+
+# If a ${PYTHON_COMMAND} command is available, use it in preference to python
+if command -v ${PYTHON_COMMAND} >/dev/null 2>&1; then
+ python_exe=${PYTHON_COMMAND}
+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
+cmd=${full_cmd##*/}
+
+exec "${python_exe:-python}" -m edk2basetools.$cmd "$@"