edksetup.sh: Fix the Issue of PYTHON_COMMAND Un-Configurable
- With the commit e6447d2a08
introduced,
there do not have chance for caller to configure the PYTHON_COMMAND
environment variable outside of this script.
- All the configured value would be assigned into "python3" forcedly,
without checking the environment variable is set or not.
- This patch included the below changes,
- Check the "PYTHON_COMMAND" is set or not before assigning
the default value "python3" on it.
- Rename the function naming into "SetupPythonCommand" to align
its functionality.
Signed-off-by: Jason1 Lin <jason1.lin@intel.com>
This commit is contained in:
parent
b7342074a6
commit
e19cc32bce
12
edksetup.sh
12
edksetup.sh
|
@ -103,14 +103,22 @@ SetupEnv()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
SetupPython3()
|
SetupPythonCommand()
|
||||||
{
|
{
|
||||||
|
#
|
||||||
|
# If PYTHON_COMMAND is already set, then we can return right now
|
||||||
|
#
|
||||||
|
if [ -n "$PYTHON_COMMAND" ]
|
||||||
|
then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
|
||||||
export PYTHON_COMMAND=python3
|
export PYTHON_COMMAND=python3
|
||||||
}
|
}
|
||||||
|
|
||||||
SourceEnv()
|
SourceEnv()
|
||||||
{
|
{
|
||||||
SetupPython3
|
SetupPythonCommand
|
||||||
SetWorkspace
|
SetWorkspace
|
||||||
SetupEnv
|
SetupEnv
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue