Files
.github
NSIS
media
scripts
Developer Console.cmd
Start Stable Diffusion UI.cmd
bootstrap.bat
bootstrap.sh
check_modules.py
config.yaml.sample
developer_console.sh
functions.sh
get_config.py
install_status.txt
on_env_start.bat
on_env_start.sh
on_sd_start.bat
on_sd_start.sh
start.sh
webui_console.py
win_enable_long_filepaths.ps1
ui
.gitignore
.prettierignore
.prettierrc.json
3rd-PARTY-LICENSES
CHANGES.md
CONTRIBUTING.md
CreativeML Open RAIL-M License
How to install and run.txt
LICENSE
PRIVACY.md
README BEFORE YOU RUN THIS.txt
README.md
build.bat
build.sh
environment.yaml
package.json
easydiffusion/scripts/functions.sh
2023-06-14 11:57:06 +02:00

40 lines
1.0 KiB
Bash

#
# utility functions for all scripts
#
fail() {
echo
echo "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE"
echo
if [ "$1" != "" ]; then
echo ERROR: $1
else
echo An error occurred.
fi
cat <<EOF
Error downloading Stable Diffusion UI. Sorry about that, please try to:
1. Run this installer again.
2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/easydiffusion/easydiffusion/wiki/Troubleshooting
3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB
4. If that doesn't solve the problem, please file an issue at https://github.com/easydiffusion/easydiffusion/issues
Thanks!
EOF
read -p "Press any key to continue"
exit 1
}
filesize() {
case "$(uname -s)" in
Linux*) stat -c "%s" $1;;
Darwin*) /usr/bin/stat -f "%z" $1;;
*) echo "Unknown OS: $OS_NAME! This script runs only on Linux or Mac" && exit
esac
}