BaseTools: Update windows and linux run scripts file to use Python3
Modify windows script, PosixLike script, edksetup.sh, edksetup.bat to use Python3 Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
committed by
Yonghong Zhu
parent
8be15c61e8
commit
04c47cd401
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,9 +1,9 @@
|
||||
#!/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
|
||||
# If a PYTHON3 command is available, use it in preference to python
|
||||
if command -v $PYTHON3 >/dev/null 2>&1; then
|
||||
python_exe=$PYTHON3
|
||||
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
|
||||
|
@@ -1,4 +1,4 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@set PYTHONPATH=%PYTHONPATH%;%BASE_TOOLS_PATH%\Source\Python
|
||||
@%PYTHON_HOME%\python.exe -m %ToolName%.%ToolName% %*
|
||||
@%PYTHON3% -m %ToolName%.%ToolName% %*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@set PYTHONPATH=%PYTHONPATH%;%BASE_TOOLS_PATH%\Source\Python
|
||||
@%PYTHON_HOME%\python.exe -m %ToolName%.EccMain %*
|
||||
@%PYTHON3% -m %ToolName%.EccMain %*
|
||||
|
@@ -1,3 +1,3 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\AutoGen\%ToolName%.py %*
|
||||
@%PYTHON3% %BASE_TOOLS_PATH%\Source\Python\AutoGen\%ToolName%.py %*
|
||||
|
@@ -1,4 +1,4 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@set PYTHONPATH=%PYTHONPATH%;%BASE_TOOLS_PATH%\Source\Python
|
||||
@%PYTHON_HOME%\python.exe -m %ToolName%.%ToolName% %*
|
||||
@%PYTHON3% -m %ToolName%.%ToolName% %*
|
||||
|
@@ -1,3 +1,3 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
@%PYTHON3% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
|
@@ -1 +1 @@
|
||||
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\Capsule\GenerateCapsule.py %*
|
||||
@%PYTHON3% %BASE_TOOLS_PATH%\Source\Python\Capsule\GenerateCapsule.py %*
|
||||
|
@@ -1,3 +1,3 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
@%PYTHON3% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
|
@@ -1,3 +1,3 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
@%PYTHON3% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
|
@@ -1 +1 @@
|
||||
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\Rsa2048Sha256Sign\Rsa2048Sha256GenerateKeys.py %*
|
||||
@%PYTHON3% %BASE_TOOLS_PATH%\Source\Python\Rsa2048Sha256Sign\Rsa2048Sha256GenerateKeys.py %*
|
||||
|
@@ -1,3 +1,3 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
@%PYTHON3% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
|
@@ -1,3 +1,3 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
@%PYTHON3% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
|
@@ -1,3 +1,3 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
@%PYTHON3% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
|
@@ -1,3 +1,3 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
@%PYTHON3% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
|
@@ -1,3 +1,3 @@
|
||||
@setlocal
|
||||
@set ToolName=%~n0%
|
||||
@%PYTHON_HOME%\python.exe %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
@%PYTHON3% %BASE_TOOLS_PATH%\Source\Python\%ToolName%\%ToolName%.py %*
|
||||
|
Reference in New Issue
Block a user