summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-12-13 20:29:10 -0800
committerZac Medico <zmedico@gentoo.org>2010-12-14 06:28:31 -0800
commita729e9c5ac317e08625d8a62e1ba4794623ab2c9 (patch)
tree57a38672d878347dbcdc338b56bac016244941af
parent64247b288f3fb2e4cfb72e545ffc230e8a05dd74 (diff)
downloadportage-a729e9c5ac317e08625d8a62e1ba4794623ab2c9.tar.gz
portage-a729e9c5ac317e08625d8a62e1ba4794623ab2c9.tar.bz2
portage-a729e9c5ac317e08625d8a62e1ba4794623ab2c9.zip
etc-update: eliminate duplicate example configs
-rwxr-xr-xbin/etc-update6
1 files changed, 5 insertions, 1 deletions
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