Check if requirement.txt exists

Wont error from a file that doesn't exist
This commit is contained in:
PassiveLemon 2023-05-07 12:50:33 -04:00
parent 3849c48d4e
commit 17c44cabcb

View file

@ -47,8 +47,8 @@ done
if [ "$(ls -A /stable-diffusion/custom_nodes)" ]; then if [ "$(ls -A /stable-diffusion/custom_nodes)" ]; then
chmod 777 -R "/stable-diffusion/custom_nodes/" chmod 777 -R "/stable-diffusion/custom_nodes/"
apt-get install build-essential -y apt-get install build-essential -y
for dir in "/stable-diffusion/custom_nodes/*/"; do for dir in "/stable-diffusion/custom_nodes/*"; do
if [ -d $dir ]; then if [ -e "$dir/requirements.txt" ]; then
echo $dir echo $dir
cd $dir cd $dir
pip install -r requirements.txt pip install -r requirements.txt