From 471d41bf11c394b7d75e4886c1f052d4f788e481 Mon Sep 17 00:00:00 2001 From: Rezart Qelibari Date: Mon, 14 Mar 2022 00:10:25 +0100 Subject: [PATCH] Disable tty echo during installation run --- bootstrap.sh | 4 ++++ install.sh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/bootstrap.sh b/bootstrap.sh index 42f1018..a81ffbd 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -61,6 +61,10 @@ function ensureBinary() { } function main() { + if [ -t 0 ]; then + trap "stty $(stty -g)" INT TERM EXIT + stty -echo + fi 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 } diff --git a/install.sh b/install.sh index 2d68efb..5d0e829 100755 --- a/install.sh +++ b/install.sh @@ -72,6 +72,10 @@ function checkPrerequisites() { } function main() { + if [ -t 0 ]; then + trap "stty $(stty -g)" INT TERM EXIT + stty -echo + fi autoloadZShLib || return checkPrerequisites || return eval "`docopts -f -V - -h - : "$@" <<- USAGE