Skip to content

Commit

Permalink
Add STARTUP_CMD and STARTUP_CMD_ARGS env var
Browse files Browse the repository at this point in the history
  • Loading branch information
Disty0 committed Nov 6, 2023
1 parent e5938fe commit 3f2e573
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gui.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,13 @@ then
export ClDeviceGlobalMemSizeAvailablePercent=100
fi

#Set STARTUP_CMD as normal python if not specified
if [[ -z "$STARTUP_CMD" ]]
then
STARTUP_CMD=python
fi

# Validate the requirements and run the script if successful
if python "$SCRIPT_DIR/setup/validate_requirements.py" -r "$REQUIREMENTS_FILE"; then
python "$SCRIPT_DIR/kohya_gui.py" "$@"
"${STARTUP_CMD}" $STARTUP_CMD_ARGS "$SCRIPT_DIR/kohya_gui.py" "$@"
fi

0 comments on commit 3f2e573

Please sign in to comment.