2022-09-04 16:01:34 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-09-07 09:56:09 +02:00
|
|
|
printf "Hi there, what you are running is meant for the developers of this project, not for users.\n\n"
|
2023-08-30 09:39:12 +02:00
|
|
|
printf "If you only want to use Easy Diffusion, you've downloaded the wrong file.\n"
|
2023-06-14 11:57:06 +02:00
|
|
|
printf "Please download and follow the instructions at https://github.com/easydiffusion/easydiffusion#installation \n\n"
|
2022-09-07 09:56:09 +02:00
|
|
|
printf "If you are actually a developer of this project, please type Y and press enter\n\n"
|
|
|
|
|
|
|
|
read -p "Are you a developer of this project (Y/N) " yn
|
|
|
|
case $yn in
|
2022-09-07 09:58:38 +02:00
|
|
|
[Yy]* ) ;;
|
2022-09-07 09:56:09 +02:00
|
|
|
* ) exit;;
|
|
|
|
esac
|
|
|
|
|
2023-08-30 09:39:12 +02:00
|
|
|
mkdir -p dist/linux-mac/easy-diffusion/scripts
|
2022-09-04 16:01:34 +02:00
|
|
|
|
2022-10-26 07:56:10 +02:00
|
|
|
# copy the installer files for Linux and Mac
|
2022-09-04 16:01:34 +02:00
|
|
|
|
2023-08-30 09:39:12 +02:00
|
|
|
cp scripts/on_env_start.sh dist/linux-mac/easy-diffusion/scripts/
|
|
|
|
cp scripts/bootstrap.sh dist/linux-mac/easy-diffusion/scripts/
|
|
|
|
cp scripts/functions.sh dist/linux-mac/easy-diffusion/scripts/
|
|
|
|
cp scripts/config.yaml.sample dist/linux-mac/easy-diffusion/scripts/config.yaml.sample
|
|
|
|
cp scripts/start.sh dist/linux-mac/easy-diffusion/
|
|
|
|
cp LICENSE dist/linux-mac/easy-diffusion/
|
|
|
|
cp "CreativeML Open RAIL-M License" dist/linux-mac/easy-diffusion/
|
|
|
|
cp "How to install and run.txt" dist/linux-mac/easy-diffusion/
|
|
|
|
echo "" > dist/linux-mac/easy-diffusion/scripts/install_status.txt
|
|
|
|
|
|
|
|
# set the permissions
|
|
|
|
chmod u+x dist/linux-mac/easy-diffusion/scripts/on_env_start.sh
|
|
|
|
chmod u+x dist/linux-mac/easy-diffusion/scripts/bootstrap.sh
|
|
|
|
chmod u+x dist/linux-mac/easy-diffusion/start.sh
|
2022-09-04 16:01:34 +02:00
|
|
|
|
2022-10-26 07:56:10 +02:00
|
|
|
# make the zip
|
2022-09-04 16:01:34 +02:00
|
|
|
|
2022-10-26 07:56:10 +02:00
|
|
|
cd dist/linux-mac
|
2023-08-30 09:39:12 +02:00
|
|
|
zip -r ../Easy-Diffusion-Linux.zip easy-diffusion
|
|
|
|
zip -r ../Easy-Diffusion-Mac.zip easy-diffusion
|
2022-10-26 07:56:10 +02:00
|
|
|
cd ../..
|
2022-09-04 16:01:34 +02:00
|
|
|
|
2022-10-26 07:56:10 +02:00
|
|
|
echo "Build ready. Upload the zip files inside the 'dist' folder."
|