From 0d33964a03f2db46c1abd6e0d95bc14f65598d5b Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 9 Sep 2022 17:24:30 +0530 Subject: [PATCH] Fix a transient bug in the installer code (windows) where a script overwriting itself would cause problems --- scripts/on_env_start.bat | 5 ++++- scripts/on_sd_start.bat | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/on_env_start.bat b/scripts/on_env_start.bat index 381201ce..ac58b5d7 100644 --- a/scripts/on_env_start.bat +++ b/scripts/on_env_start.bat @@ -42,6 +42,9 @@ ) @xcopy sd-ui-files\ui ui /s /i /Y -@xcopy sd-ui-files\scripts scripts /s /i /Y +@copy sd-ui-files\scripts\on_sd_start.bat scripts\ /Y +@copy "sd-ui-files\scripts\Start Stable Diffusion UI.cmd" . /Y @call scripts\on_sd_start.bat + +@pause \ No newline at end of file diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 346f6358..f5315eda 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -1,5 +1,7 @@ @echo off +@copy sd-ui-files\scripts\on_env_start.bat scripts\ /Y + @>nul grep -c "sd_git_cloned" scripts\install_status.txt @if "%ERRORLEVEL%" EQU "0" ( @echo "Stable Diffusion's git repository was already installed. Updating.."