Add CMD_FLAGS.txt functionality to WSL installer (#119)

This commit is contained in:
jllllll 2023-08-05 08:26:24 -05:00 committed by GitHub
parent 601fc424cd
commit 9e17325207
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
mkdir oobabooga_{windows,linux,macos,wsl} mkdir oobabooga_{windows,linux,macos,wsl}
for p in windows macos linux wsl; do for p in windows macos linux wsl; do
if [ "$p" == "wsl" ]; then cp {*$p*\.*,webui.py,INSTRUCTIONS-WSL.txt} oobabooga_$p; if [ "$p" == "wsl" ]; then cp {*$p*\.*,webui.py,INSTRUCTIONS-WSL.txt,CMD_FLAGS.txt} oobabooga_$p;
else cp {*$p*\.*,webui.py,INSTRUCTIONS.txt,CMD_FLAGS.txt} oobabooga_$p; fi else cp {*$p*\.*,webui.py,INSTRUCTIONS.txt,CMD_FLAGS.txt} oobabooga_$p; fi
zip -r oobabooga_$p.zip oobabooga_$p; zip -r oobabooga_$p.zip oobabooga_$p;
done done

1
wsl.sh
View File

@ -46,6 +46,7 @@ if [[ "$INSTALL_DIR" =~ " " ]]; then echo This script relies on Miniconda which
# create install dir if missing and copy webui.py to install dir to maintain functionality without edit # create install dir if missing and copy webui.py to install dir to maintain functionality without edit
if [ ! -d "$INSTALL_DIR" ]; then mkdir -p "$INSTALL_DIR" || exit; fi if [ ! -d "$INSTALL_DIR" ]; then mkdir -p "$INSTALL_DIR" || exit; fi
cp -u "./webui.py" "$INSTALL_DIR" cp -u "./webui.py" "$INSTALL_DIR"
if [ -f "./CMD_FLAGS.txt" ]; then cp -u "./CMD_FLAGS.txt" "$INSTALL_DIR"; fi
# figure out whether git and conda needs to be installed # figure out whether git and conda needs to be installed
if "$CONDA_ROOT_PREFIX/bin/conda" --version &>/dev/null; then conda_exists="T"; fi if "$CONDA_ROOT_PREFIX/bin/conda" --version &>/dev/null; then conda_exists="T"; fi