From 6d91a39c1e0302133ae51de23ab677fb06700ae7 Mon Sep 17 00:00:00 2001 From: layman Date: Thu, 11 Jan 2018 12:11:48 +0100 Subject: [PATCH] gentooup: do not use --ask if no tty is present --- gentooup.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/gentooup.sh b/gentooup.sh index a0399d2..395293f 100755 --- a/gentooup.sh +++ b/gentooup.sh @@ -18,7 +18,14 @@ trap int_handler INT TERM EXIT STARTDATE="$(date -Iseconds)" if [[ -x /etc/cron.daily/porticron ]] ; then - echo "porticron" + echo "porticron detected! -> skipping --ask" + PORTAGE_ASK="" +fi + +if [[ ! -t 1 ]] ; then + echo "No tty connected! -> skipping --ask" + echo "Waiting 10s for manual abortion..." + sleep 10 PORTAGE_ASK="" fi