ztrace: clean up screen on exit

This commit is contained in:
Zach Dykstra 2023-12-08 21:18:07 -06:00
parent 6d9684c838
commit b231456b7b
No known key found for this signature in database
GPG Key ID: F2F0D4FB7A2861E8
1 changed files with 6 additions and 0 deletions

View File

@ -1,10 +1,16 @@
#!/bin/bash
cleanup() {
tput clear
}
# Unusable for now with busybox-provided dmesg/less
if ! dmesg -T --time-format reltime -f user -l 7 >/dev/null 2>&1 ; then
exit 0
fi
trap cleanup EXIT INT TERM
r="\033[0;31m"
g="\033[0;32m"
o="\033[0;33m"