Hide cursor during installation run

This commit is contained in:
Rezart Qelibari
2022-03-14 01:45:05 +01:00
parent 471d41bf11
commit 3b70137c27
2 changed files with 5 additions and 0 deletions

View File

@@ -65,6 +65,7 @@ function main() {
trap "stty $(stty -g)" INT TERM EXIT
stty -echo
fi
[ -t 1 ] && tput civis && export TERMINAL_CURSOR_HIDDEN=true
local -A colors=() errColors=()
defineColors
id -Gn | grep admin >&! /dev/null || { printError 'This script requires root access. Please run as an admin user.'; return 10 }
@@ -78,7 +79,10 @@ function main() {
ensureBinary 'docopts' ensureDocopts || return
print 'Will now run the installer.'
local -A colors=() errColors=()
[ -t 1 ] && tput cnorm
sudo "${tmpdir}/install.sh" "$@"
[ -t 1 ] && tput civis
popd -q
}

View File

@@ -76,6 +76,7 @@ function main() {
trap "stty $(stty -g)" INT TERM EXIT
stty -echo
fi
[ -t 1 ] && tput civis && export TERMINAL_CURSOR_HIDDEN=true
autoloadZShLib || return
checkPrerequisites || return
eval "`docopts -f -V - -h - : "$@" <<- USAGE