diff --git a/departure.sh b/departure.sh index 600542e..e12157e 100755 --- a/departure.sh +++ b/departure.sh @@ -5,6 +5,14 @@ if [ -z "$(which jq)" ]; then exit 1 fi +trap do_exit INT + +do_exit() { + tput cvvis # unhide cursor + exit 0 +} + +tput civis # hide cursor CHCHPOSITION=0 while true; do @@ -335,3 +343,5 @@ while true; do fi sleep 10 done + +exit 1