mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
Support python3 only systems
Ubuntu 20.04 and latest Cygwin come with no Python 2 and no link from python to python3. To not mess with the system we detect python3 for seamless support.
This commit is contained in:
committed by
Nuno Marques
parent
b8576cccc8
commit
6602e8d16b
@@ -6,8 +6,14 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
export APPSDIR="`pwd`/../apps"
|
||||
export CONFIG_ARCH_BOARD_CUSTOM=y
|
||||
|
||||
if [ "command -v python3" ]; then
|
||||
PYTHON_EXECUTABLE=python3
|
||||
else
|
||||
PYTHON_EXECUTABLE=python
|
||||
fi
|
||||
|
||||
if [ "${1}" = "--olddefconfig" ]; then
|
||||
PYTHONPATH=${DIR} python ${DIR}/olddefconfig.py > /dev/null
|
||||
PYTHONPATH=${DIR} ${PYTHON_EXECUTABLE} ${DIR}/olddefconfig.py > /dev/null
|
||||
else
|
||||
echo "ERROR: ${@} unsupported"
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user