From 3224cd73ed7952a253da2bbb7dafcd910d168de3 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Wed, 7 Sep 2022 20:01:39 +0530 Subject: [PATCH] can't overwrite self - linux install script --- scripts/on_env_start.sh | 4 ++-- scripts/on_sd_start.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/on_env_start.sh b/scripts/on_env_start.sh index 13cada92..145abd3a 100755 --- a/scripts/on_env_start.sh +++ b/scripts/on_env_start.sh @@ -22,7 +22,7 @@ else fi cp -Rf sd-ui-files/ui ui -cp -Rf sd-ui-files/scripts/* scripts/ -cp "scripts/start.sh" . +cp sd-ui-files/scripts/on_sd_start.sh scripts/ +cp sd-ui-files/scripts/start.sh . ./scripts/on_sd_start.sh diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index 5e9924ca..200d7f20 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -1,6 +1,8 @@ +cp sd-ui-files/scripts/on_env_start.sh scripts/ + source installer/etc/profile.d/conda.sh -if [ `grep -c sd_git_cloned scripts/install_status.txt` -gt "0" ]; then +if [ -e "scripts/install_status.txt" ] && [ `grep -c sd_git_cloned scripts/install_status.txt` -gt "0" ]; then echo "Stable Diffusion's git repository was already installed. Updating.." cd stable-diffusion