mirror of https://github.com/vladmandic/automatic
update startup scripts
parent
13911288dd
commit
7ee0d65c13
|
|
@ -1 +1 @@
|
|||
Subproject commit 3011ff6e706d3fdd0cc7d2ac8ff0d59020b8f767
|
||||
Subproject commit 27c522029e6efe64fe889c89386497b5a14d3512
|
||||
|
|
@ -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
|
||||
|
||||
if not defined PYTHON (set PYTHON=python)
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
Write-Output "exit code: $LASTEXITCODE"
|
||||
|
||||
|
|
|
|||
19
webui.sh
19
webui.sh
|
|
@ -1,8 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
#################################################
|
||||
# Please do not make any changes to this file, #
|
||||
# change the variables in webui-user.sh instead #
|
||||
#################################################
|
||||
# -------------------------------------------------------------------------------------------------------------
|
||||
# Do not make any changes to this file, change the variables in webui-user.sh instead and call this file
|
||||
# -------------------------------------------------------------------------------------------------------------
|
||||
|
||||
# change to local directory
|
||||
cd -- "$(dirname -- "$0")"
|
||||
|
|
@ -18,9 +17,9 @@ then
|
|||
fi
|
||||
|
||||
# python3 executable
|
||||
if [[ -z "${python_cmd}" ]]
|
||||
if [[ -z "${PYTHON}" ]]
|
||||
then
|
||||
python_cmd="python3"
|
||||
PYTHON="python3"
|
||||
fi
|
||||
|
||||
# git executable
|
||||
|
|
@ -51,7 +50,7 @@ then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
for preq in "${GIT}" "${python_cmd}"
|
||||
for preq in "${GIT}" "${PYTHON}"
|
||||
do
|
||||
if ! hash "${preq}" &>/dev/null
|
||||
then
|
||||
|
|
@ -60,7 +59,7 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
if ! "${python_cmd}" -c "import venv" &>/dev/null
|
||||
if ! "${PYTHON}" -c "import venv" &>/dev/null
|
||||
then
|
||||
echo "Error: python3-venv is not installed"
|
||||
exit 1
|
||||
|
|
@ -69,7 +68,7 @@ fi
|
|||
echo "Create and activate python venv"
|
||||
if [[ ! -d "${venv_dir}" ]]
|
||||
then
|
||||
"${python_cmd}" -m venv "${venv_dir}"
|
||||
"${PYTHON}" -m venv "${venv_dir}"
|
||||
first_launch=1
|
||||
fi
|
||||
|
||||
|
|
@ -102,5 +101,5 @@ then
|
|||
exec ipexrun --multi-task-manager 'taskset' --memory-allocator 'jemalloc' launch.py "$@"
|
||||
else
|
||||
echo "Launching launch.py..."
|
||||
exec "${python_cmd}" launch.py "$@"
|
||||
exec "${PYTHON}" launch.py "$@"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue