18 lines
390 B
Bash
Executable File
18 lines
390 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
pkg="/stable-diffusion-ui.pkg.tar.zst"
|
|
cfg="/opt/stable-diffusion-ui/config.yaml"
|
|
|
|
if [[ -f "$pkg" ]]; then
|
|
pacman -U --noconfirm --overwrite '/opt/stable-diffusion-ui/*' "$pkg"
|
|
rm -vf "$pkg"
|
|
fi
|
|
|
|
if ! [[ -f "$cfg" ]]; then
|
|
mv /config.yaml "$cfg" || {
|
|
printf 'Failed to move the default config file to %s!\n' "$cfg"
|
|
}
|
|
fi
|
|
|
|
exec /usr/bin/stable-diffusion-ui-server
|