update startup scripts

pull/2440/head
Vladimir Mandic 2023-11-04 08:22:57 -04:00
parent 13911288dd
commit 7ee0d65c13
4 changed files with 18 additions and 11 deletions

@ -1 +1 @@
Subproject commit 3011ff6e706d3fdd0cc7d2ac8ff0d59020b8f767 Subproject commit 27c522029e6efe64fe889c89386497b5a14d3512

View File

@ -1,3 +1,7 @@
:: --------------------------------------------------------------------------------------------------------------
:: Do not make any changes to this file, change the variables in webui-user.bat instead and call this file
:: --------------------------------------------------------------------------------------------------------------
@echo off @echo off
if not defined PYTHON (set PYTHON=python) if not defined PYTHON (set PYTHON=python)

View File

@ -1,3 +1,7 @@
# --------------------------------------------------------------------------------------------------------------
# Do not make any changes to this file, change the variables in webui-user.ps1 instead and call this file
# --------------------------------------------------------------------------------------------------------------
function ShowStdOutStdErr { function ShowStdOutStdErr {
Write-Output "exit code: $LASTEXITCODE" Write-Output "exit code: $LASTEXITCODE"

View File

@ -1,8 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
################################################# # -------------------------------------------------------------------------------------------------------------
# Please do not make any changes to this file, # # Do not make any changes to this file, change the variables in webui-user.sh instead and call this file
# change the variables in webui-user.sh instead # # -------------------------------------------------------------------------------------------------------------
#################################################
# change to local directory # change to local directory
cd -- "$(dirname -- "$0")" cd -- "$(dirname -- "$0")"
@ -18,9 +17,9 @@ then
fi fi
# python3 executable # python3 executable
if [[ -z "${python_cmd}" ]] if [[ -z "${PYTHON}" ]]
then then
python_cmd="python3" PYTHON="python3"
fi fi
# git executable # git executable
@ -51,7 +50,7 @@ then
exit 1 exit 1
fi fi
for preq in "${GIT}" "${python_cmd}" for preq in "${GIT}" "${PYTHON}"
do do
if ! hash "${preq}" &>/dev/null if ! hash "${preq}" &>/dev/null
then then
@ -60,7 +59,7 @@ do
fi fi
done done
if ! "${python_cmd}" -c "import venv" &>/dev/null if ! "${PYTHON}" -c "import venv" &>/dev/null
then then
echo "Error: python3-venv is not installed" echo "Error: python3-venv is not installed"
exit 1 exit 1
@ -69,7 +68,7 @@ fi
echo "Create and activate python venv" echo "Create and activate python venv"
if [[ ! -d "${venv_dir}" ]] if [[ ! -d "${venv_dir}" ]]
then then
"${python_cmd}" -m venv "${venv_dir}" "${PYTHON}" -m venv "${venv_dir}"
first_launch=1 first_launch=1
fi fi
@ -102,5 +101,5 @@ then
exec ipexrun --multi-task-manager 'taskset' --memory-allocator 'jemalloc' launch.py "$@" exec ipexrun --multi-task-manager 'taskset' --memory-allocator 'jemalloc' launch.py "$@"
else else
echo "Launching launch.py..." echo "Launching launch.py..."
exec "${python_cmd}" launch.py "$@" exec "${PYTHON}" launch.py "$@"
fi fi