dev: add confirmation process for each message in update.sh

This commit is contained in:
naskya 2023-10-28 21:42:14 +09:00
parent 624f31ffaf
commit 27dccb3deb
Signed by: naskya
GPG key ID: 164DFF24E2D40139
2 changed files with 16 additions and 4 deletions

View file

@ -251,7 +251,7 @@ ToDo (#82)
1. 新しい Firefish のディレクトリに入ってビルドする
```sh
$ cd calckey
$ ./update.sh
$ ./update.sh --no-confirm
```
1. サーバーを起動して動作を確認する
```sh

View file

@ -68,9 +68,21 @@ for message in neko/messages/*; do
if [[ ! -f "neko/flags/${file}" ]]; then
say "There is an important notice!"
cat "${message}"
touch "neko/flags/${file}"
say "To read this again, run: \$ cat ${message}"
exit 1
if [[ $# != 1 ]] || [[ $1 != "--no-confirm" ]]; then
say "Continue? (Are you ready for upgrading?)"
read -r -p "[y/N] > " yn
case "${yn}" in
[Yy]|[Yy][Ee][Ss])
touch "neko/flags/${file}"
say "Let's go!"
say "To read the message again, run: \$ cat ${message}"
;;
*)
say "Okay, please run this script again when you're ready!"
exit 1
;;
esac
fi
fi
done