dev: add --no-confirm option to update.sh

This commit is contained in:
naskya 2023-10-27 23:05:57 +09:00
parent 8356a9c62b
commit 93a3000d28
Signed by: naskya
GPG key ID: 164DFF24E2D40139

View file

@ -14,17 +14,21 @@ function running {
} }
say "Start upgrading Firefish!" say "Start upgrading Firefish!"
say "Did you stop your server?"
read -r -p "[Y/n] > " yn # Confirm that the server is stopped
case "${yn}" in if [[ $# != 1 ]] || [[ $1 != "--no-confirm" ]]; then
[Nn]|[Nn][Oo]) say "Did you stop your server?"
say "You must stop your server first!" read -r -p "[Y/n] > " yn
exit 1 case "${yn}" in
;; [Nn]|[Nn][Oo])
*) say "You must stop your server first!"
say "uwu~ erai erai!\n" exit 1
;; ;;
esac *)
say "uwu~ erai erai!\n"
;;
esac
fi
# Pull changes # Pull changes
## git pull ## git pull