From 46365d1a8407cee4da834d8a41a30e0d3b5dff14 Mon Sep 17 00:00:00 2001 From: layman Date: Wed, 31 Aug 2022 07:54:03 +0200 Subject: [PATCH] add options to disable/enable interactive mode --- gentooup.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gentooup.sh b/gentooup.sh index c47db69..2f56f69 100755 --- a/gentooup.sh +++ b/gentooup.sh @@ -51,6 +51,18 @@ while [[ $# -gt 0 ]]; do PORTAGE_UPGRADE_OPTIONS+=("--with-bdeps=y") shift ;; + --batch) + echo "We do not ask questions" + PORTAGE_ASK="" + INTERACTIVE=0 + shift + ;; + --interactive) + echo "We do ask questions" + INTERACTIVE=1 + PORTAGE_ASK="-a" + shift + ;; --*) echo "Unknown option $1" shift