dev: add confirmation process for each message in update.sh
This commit is contained in:
parent
624f31ffaf
commit
27dccb3deb
2 changed files with 16 additions and 4 deletions
|
@ -251,7 +251,7 @@ ToDo (#82)
|
||||||
1. 新しい Firefish のディレクトリに入ってビルドする
|
1. 新しい Firefish のディレクトリに入ってビルドする
|
||||||
```sh
|
```sh
|
||||||
$ cd calckey
|
$ cd calckey
|
||||||
$ ./update.sh
|
$ ./update.sh --no-confirm
|
||||||
```
|
```
|
||||||
1. サーバーを起動して動作を確認する
|
1. サーバーを起動して動作を確認する
|
||||||
```sh
|
```sh
|
||||||
|
|
18
update.sh
18
update.sh
|
@ -68,9 +68,21 @@ for message in neko/messages/*; do
|
||||||
if [[ ! -f "neko/flags/${file}" ]]; then
|
if [[ ! -f "neko/flags/${file}" ]]; then
|
||||||
say "There is an important notice!"
|
say "There is an important notice!"
|
||||||
cat "${message}"
|
cat "${message}"
|
||||||
touch "neko/flags/${file}"
|
if [[ $# != 1 ]] || [[ $1 != "--no-confirm" ]]; then
|
||||||
say "To read this again, run: \$ cat ${message}"
|
say "Continue? (Are you ready for upgrading?)"
|
||||||
exit 1
|
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
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue