]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/BinWrappers/PosixLike/PatchPcdValue
BaseTools: Update windows and linux run scripts file to use Python3
[mirror_edk2.git] / BaseTools / BinWrappers / PosixLike / PatchPcdValue
CommitLineData
5ef6e0d3
LG
1#!/usr/bin/env bash
2#python `dirname $0`/RunToolFromSource.py `basename $0` $*
5ef6e0d3 3
9c2d68c0
ZF
4# If a ${PYTHON} command is available, use it in preference to python
5if command -v ${PYTHON} >/dev/null 2>&1; then
6 python_exe=${PYTHON}
6928c1d3
CD
7fi
8
9full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here
10dir=$(dirname "$full_cmd")
11cmd=${full_cmd##*/}
12
b12b2c74 13export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
6928c1d3 14exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"