From: Zac Medico Date: Tue, 14 Dec 2010 04:29:10 +0000 (-0800) Subject: etc-update: eliminate duplicate example configs X-Git-Tag: v2.1.9.26~19 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a729e9c5ac317e08625d8a62e1ba4794623ab2c9;p=portage.git etc-update: eliminate duplicate example configs --- diff --git a/bin/etc-update b/bin/etc-update index d3b988ab6..e64ef493b 100755 --- a/bin/etc-update +++ b/bin/etc-update @@ -466,7 +466,11 @@ do_distconf() { suffix+="${count}" efile="${ofile}${suffix}" if [[ ! -f ${efile} ]]; then - mv ${mv_opts} ${file} ${efile} + mv ${mv_opts} "${file}" "${efile}" + break + elif diff_command "${file}" "${efile}" &> /dev/null; then + # replace identical copy + mv "${file}" "${efile}" break fi done