From 89a293efe0aa067bf03608a7d826bfb35df2f2ff Mon Sep 17 00:00:00 2001 From: Tobias Klaus Date: Thu, 8 Feb 2018 13:56:50 +0100 Subject: [PATCH] gentooup: only use dispatch-conf if a tty is available --- gentooup.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/gentooup.sh b/gentooup.sh index 2af6bc0..f24eeab 100755 --- a/gentooup.sh +++ b/gentooup.sh @@ -54,14 +54,16 @@ echo "emerge options: ${PORTAGE_OPTIONS[*]}" emerge $PORTAGE_ASK "${PORTAGE_UPGRADE_OPTIONS[@]}" "${PORTAGE_OPTIONS[@]}" world echo "emerge return value: $?" -dispatch-conf -echo "dispatch-conf return value: $?" +if [[ -t 1 ]] ; then + dispatch-conf + echo "dispatch-conf return value: $?" -emerge "${PORTAGE_UPGRADE_OPTIONS[@]}" "${PORTAGE_OPTIONS[@]}" world -echo emerge return value: $? + emerge "${PORTAGE_UPGRADE_OPTIONS[@]}" "${PORTAGE_OPTIONS[@]}" world + echo emerge return value: $? -dispatch-conf -echo dispatch-conf return value: $? + dispatch-conf + echo dispatch-conf return value: $? +fi SETS=("@preserved-rebuild")