From 3b70137c2778586c52f98f2433d5d1487347c1cc Mon Sep 17 00:00:00 2001 From: Rezart Qelibari Date: Mon, 14 Mar 2022 01:45:05 +0100 Subject: [PATCH] Hide cursor during installation run --- bootstrap.sh | 4 ++++ install.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index a81ffbd..024b339 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -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 } diff --git a/install.sh b/install.sh index 5d0e829..d9afb7e 100755 --- a/install.sh +++ b/install.sh @@ -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