Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 416917 | Differences between
and this patch

Collapse All | Expand All

(-)a/bin/etc-update (-6 / +8 lines)
Lines 62-68 do_mv_ln() { Link Here
62
}
62
}
63
63
64
scan() {
64
scan() {
65
	echo "Scanning Configuration files..."
65
	${QUIET} || echo "Scanning Configuration files..."
66
	rm -rf "${TMP}"/files > /dev/null 2>&1
66
	rm -rf "${TMP}"/files > /dev/null 2>&1
67
	mkdir "${TMP}"/files || die "Failed mkdir command!"
67
	mkdir "${TMP}"/files || die "Failed mkdir command!"
68
	count=0
68
	count=0
Lines 107-119 scan() { Link Here
107
			for mpath in ${CONFIG_PROTECT_MASK}; do
107
			for mpath in ${CONFIG_PROTECT_MASK}; do
108
				mpath="${EROOT%/}${mpath}"
108
				mpath="${EROOT%/}${mpath}"
109
				if [[ "${rpath}" == "${mpath}"* ]] ; then
109
				if [[ "${rpath}" == "${mpath}"* ]] ; then
110
					echo "Updating masked file: ${live_file}"
110
					${QUIET} || echo "Updating masked file: ${live_file}"
111
					mv "${cfg_file}" "${live_file}"
111
					mv "${cfg_file}" "${live_file}"
112
					continue 2
112
					continue 2
113
				fi
113
				fi
114
			done
114
			done
115
			if [[ ! -f ${file} ]] ; then
115
			if [[ ! -f ${file} ]] ; then
116
				echo "Skipping non-file ${file} ..."
116
				${QUIET} || echo "Skipping non-file ${file} ..."
117
				continue
117
				continue
118
			fi
118
			fi
119
119
Lines 140-146 scan() { Link Here
140
				fi
140
				fi
141
141
142
				if [[ ${MATCHES} == 1 ]] ; then
142
				if [[ ${MATCHES} == 1 ]] ; then
143
					echo "Automerging trivial changes in: ${live_file}"
143
					${QUIET} || echo "Automerging trivial changes in: ${live_file}"
144
					do_mv_ln "${cfg_file}" "${live_file}"
144
					do_mv_ln "${cfg_file}" "${live_file}"
145
					continue
145
					continue
146
				else
146
				else
Lines 547-555 die() { Link Here
547
	local msg=$1 exitcode=${2:-1}
547
	local msg=$1 exitcode=${2:-1}
548
548
549
	if [ ${exitcode} -eq 0 ] ; then
549
	if [ ${exitcode} -eq 0 ] ; then
550
		printf 'Exiting: %b\n' "${msg}"
550
		${QUIET} || printf 'Exiting: %b\n' "${msg}"
551
		scan > /dev/null
551
		scan > /dev/null
552
		[ ${count} -gt 0 ] && echo "NOTE: ${count} updates remaining"
552
		! ${QUIET} && [ ${count} -gt 0 ] && echo "NOTE: ${count} updates remaining"
553
	else
553
	else
554
		error "${msg}"
554
		error "${msg}"
555
	fi
555
	fi
Lines 599-610 declare title="Gentoo's etc-update tool!" Link Here
599
599
600
PREEN=false
600
PREEN=false
601
SET_X=false
601
SET_X=false
602
QUIET=false
602
VERBOSE=false
603
VERBOSE=false
603
while [[ -n $1 ]] ; do
604
while [[ -n $1 ]] ; do
604
	case $1 in
605
	case $1 in
605
		-d|--debug)   SET_X=true;;
606
		-d|--debug)   SET_X=true;;
606
		-h|--help)    usage;;
607
		-h|--help)    usage;;
607
		-p|--preen)   PREEN=true;;
608
		-p|--preen)   PREEN=true;;
609
		-q|--quiet)   QUIET=true;;
608
		-v|--verbose) VERBOSE=true;;
610
		-v|--verbose) VERBOSE=true;;
609
		-V|--version) emerge --version; exit 0;;
611
		-V|--version) emerge --version; exit 0;;
610
		--automode)   parse_automode_flag $2 && shift || usage 1 "Invalid mode '$2'";;
612
		--automode)   parse_automode_flag $2 && shift || usage 1 "Invalid mode '$2'";;

Return to bug 416917