From 06c8a004d840d341cf7fd2423330a28afc36257d Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 7 Oct 2022 19:52:31 +0530 Subject: [PATCH] Remove the old dev console scripts --- scripts/on_sd_start.bat | 1 + scripts/on_sd_start.sh | 3 +++ 2 files changed, 4 insertions(+) diff --git a/scripts/on_sd_start.bat b/scripts/on_sd_start.bat index 520fe8d8..b857451a 100644 --- a/scripts/on_sd_start.bat +++ b/scripts/on_sd_start.bat @@ -6,6 +6,7 @@ @REM Note to self: Please rewrite this in Python. For the sake of your own sanity. @copy "sd-ui-files\scripts\Developer Console.cmd" . /Y +if exist "Open Developer Console.cmd" del "Open Developer Console.cmd" @call python -c "import os; import shutil; frm = 'sd-ui-files\\ui\\hotfix\\9c24e6cd9f499d02c4f21a033736dabd365962dc80fe3aeb57a8f85ea45a20a3.26fead7ea4f0f843f6eb4055dfd25693f1a71f3c6871b184042d4b126244e142'; dst = os.path.join(os.path.expanduser('~'), '.cache', 'huggingface', 'transformers', '9c24e6cd9f499d02c4f21a033736dabd365962dc80fe3aeb57a8f85ea45a20a3.26fead7ea4f0f843f6eb4055dfd25693f1a71f3c6871b184042d4b126244e142'); shutil.copyfile(frm, dst) if os.path.exists(dst) else print(''); print('Hotfixed broken JSON file from OpenAI');" diff --git a/scripts/on_sd_start.sh b/scripts/on_sd_start.sh index 6942aa93..8f5f7551 100755 --- a/scripts/on_sd_start.sh +++ b/scripts/on_sd_start.sh @@ -5,6 +5,9 @@ cp sd-ui-files/scripts/on_env_start.sh scripts/ source installer/etc/profile.d/conda.sh cp sd-ui-files/scripts/developer_console.sh . +if [ -e "open_dev_console.sh" ]; then + rm "open_dev_console.sh" +fi python -c "import os; import shutil; frm = 'sd-ui-files/ui/hotfix/9c24e6cd9f499d02c4f21a033736dabd365962dc80fe3aeb57a8f85ea45a20a3.26fead7ea4f0f843f6eb4055dfd25693f1a71f3c6871b184042d4b126244e142'; dst = os.path.join(os.path.expanduser('~'), '.cache', 'huggingface', 'transformers', '9c24e6cd9f499d02c4f21a033736dabd365962dc80fe3aeb57a8f85ea45a20a3.26fead7ea4f0f843f6eb4055dfd25693f1a71f3c6871b184042d4b126244e142'); shutil.copyfile(frm, dst) if os.path.exists(dst) else print(''); print('Hotfixed broken JSON file from OpenAI');"