From: Zac Medico Date: Tue, 14 Dec 2010 04:29:10 +0000 (-0800) Subject: etc-update: eliminate duplicate example configs X-Git-Tag: v2.2.0_alpha9~5 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=25e39c5ee5873c54a038d8b6429cd7c8eb34f0db;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