From 254e853c8a6aad06d4781b0eb0f5a1d2e1919754 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 31 May 2011 14:48:55 -0700 Subject: [PATCH] etc-update: add clear_term config for bug #142508 --- bin/etc-update | 7 ++++--- cnf/etc-update.conf | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/bin/etc-update b/bin/etc-update index 2369f04f4..42518adc6 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -149,7 +149,7 @@ sel_file() { elif [ "${DELETE_ALL}" == "yes" ]; then input=0 else - clear + [[ $CLEAR_TERM == yes ]] && clear if [[ ${mode} == 0 ]] ; then echo "The following is the list of files which need updating, each configuration file is followed by a list of possible replacement files." @@ -317,7 +317,7 @@ do_cfg() { elif [[ "${DELETE_ALL}" == "yes" ]] && ! user_special "${ofile}"; then my_input=2 else - clear + [[ $CLEAR_TERM == yes ]] && clear if [ "${using_editor}" == 0 ]; then ( echo "Showing differences between ${ofile} and ${file}" @@ -421,7 +421,7 @@ Please select from the menu above (-1 to exit, losing this merge): " return 255 ;; 2) - clear + [[ $CLEAR_TERM == yes ]] && clear if [ "${using_editor}" == 0 ]; then ( echo "Showing differences between ${ofile} and ${mfile}" @@ -555,6 +555,7 @@ chown ${UID:-0}:${GID:-0} "${TMP}" || die "failed to set ownership on temp dir" #CONFIG_PROTECT_MASK=$(/usr/lib/portage/bin/portageq envvar CONFIG_PROTECT_MASK) # load etc-config's configuration +CLEAR_TERM=$(get_config clear_term) EU_AUTOMERGE=$(get_config eu_automerge) rm_opts=$(get_config rm_opts) mv_opts=$(get_config mv_opts) diff --git a/cnf/etc-update.conf b/cnf/etc-update.conf index 8157c3dc7..6f69dee61 100644 --- a/cnf/etc-update.conf +++ b/cnf/etc-update.conf @@ -5,6 +5,9 @@ # note that you need dev-util/dialog installed mode="0" +# Whether to clear the term prior to each display +clear_term="yes" + # Whether trivial/comment changes should be automerged eu_automerge="yes" -- 2.26.2