From dd6a629009aa1ed026ff0cdd02f082511a53c075 Mon Sep 17 00:00:00 2001 From: naskya Date: Fri, 29 Dec 2023 18:35:28 +0900 Subject: [PATCH] dev: ignore resolved messages --- update.sh | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/update.sh b/update.sh index a9395a9a..d96d9984 100755 --- a/update.sh +++ b/update.sh @@ -33,31 +33,37 @@ fi ## show messages for message in neko/messages/*; do file=$(basename -- "${message}") - if [ ! -f "neko/flags/${file}" ]; then - if [ "$#" != '1' ] || [ "$1" != '--skip-all-confirmations' ]; then - say 'There is an important notice!' - cat "${message}" - say 'Continue? (Are you ready for upgrading?)' - printf '[y/N] > ' - read -r yn + case "${file}" in + *'.resolved') ;; + *) + if [ ! -f "neko/flags/${file}" ]; then + if [ "$#" != '1' ] || [ "$1" != '--skip-all-confirmations' ]; then + say 'There is an important notice!' + cat "${message}" - case "${yn}" in - [Yy]|[Yy][Ee][Ss]) + say 'Continue? (Are you ready for upgrading?)' + printf '[y/N] > ' + read -r 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}" + br + ;; + *) + say "Okay, please run this script again when you're ready!" + exit 1 + ;; + esac + else touch "neko/flags/${file}" - say "Let's go!" - say "To read the message again, run: \$ cat ${message}" - br - ;; - *) - say "Okay, please run this script again when you're ready!" - exit 1 - ;; - esac - else - touch "neko/flags/${file}" - fi - fi + fi + fi + ;; + esac done say 'Do you use Docker?'