etc-update: fix --automode -5, bug #427068
authorZac Medico <zmedico@gentoo.org>
Wed, 18 Jul 2012 20:23:38 +0000 (13:23 -0700)
committerZac Medico <zmedico@gentoo.org>
Wed, 18 Jul 2012 20:23:38 +0000 (13:23 -0700)
bin/etc-update

index 1edc91fab70a19dbcaabed0d73f17072f0917490..d763c1f738944845b21ae0a1c53900885867970a 100755 (executable)
@@ -190,6 +190,7 @@ parse_automode_flag() {
                parse_automode_flag -3
                export mv_opts=" ${mv_opts} "
                mv_opts="${mv_opts// -i / }"
+               NONINTERACTIVE_MV=true
                ;;
        -3)
                input=0
@@ -600,6 +601,7 @@ declare title="Gentoo's etc-update tool!"
 PREEN=false
 SET_X=false
 VERBOSE=false
+NONINTERACTIVE_MV=false
 while [[ -n $1 ]] ; do
        case $1 in
                -d|--debug)   SET_X=true;;
@@ -692,6 +694,11 @@ else
        fi
 fi
 
+if ${NONINTERACTIVE_MV} ; then
+       export mv_opts=" ${mv_opts} "
+       mv_opts="${mv_opts// -i / }"
+fi
+
 if ${VERBOSE} ; then
        for v in ${portage_vars[@]} ${cfg_vars[@]} TMP SCAN_PATHS ; do
                echo "${v}=${!v}"