mirror of
https://example.com
synced 2024-11-23 08:06:39 +09:00
dev: show messages in chronological order
This commit is contained in:
parent
0ac5a1e474
commit
18488962fc
1 changed files with 23 additions and 28 deletions
51
update.sh
51
update.sh
|
@ -39,39 +39,34 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## show messages
|
## show messages
|
||||||
for message in neko/messages/*; do
|
for message in $(find neko/messages -type f ! -name '*.resolved' -print | sort); do
|
||||||
file=$(basename -- "${message}")
|
file=$(basename -- "${message}")
|
||||||
|
|
||||||
case "${file}" in
|
if [ ! -f "neko/flags/${file}" ]; then
|
||||||
*'.resolved') ;;
|
if [ "$#" != '1' ] || [ "$1" != '--skip-all-confirmations' ]; then
|
||||||
*)
|
say 'There is an important notice!'
|
||||||
if [ ! -f "neko/flags/${file}" ]; then
|
cat "${message}"
|
||||||
if [ "$#" != '1' ] || [ "$1" != '--skip-all-confirmations' ]; then
|
|
||||||
say 'There is an important notice!'
|
|
||||||
cat "${message}"
|
|
||||||
|
|
||||||
say 'Continue? (Are you ready for upgrading?)'
|
say 'Continue? (Are you ready for upgrading?)'
|
||||||
printf '[y/N] > '
|
printf '[y/N] > '
|
||||||
read -r yn
|
read -r yn
|
||||||
|
|
||||||
case "${yn}" in
|
case "${yn}" in
|
||||||
[Yy]|[Yy][Ee][Ss])
|
[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}"
|
touch "neko/flags/${file}"
|
||||||
fi
|
say "Let's go!"
|
||||||
fi
|
say "To read the message again, run: \$ cat ${message}"
|
||||||
;;
|
br
|
||||||
esac
|
;;
|
||||||
|
*)
|
||||||
|
say "Okay, please run this script again when you're ready!"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
touch "neko/flags/${file}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
say 'Do you use Docker or Podman?'
|
say 'Do you use Docker or Podman?'
|
||||||
|
|
Loading…
Reference in a new issue