summaryrefslogtreecommitdiffstats
path: root/bin/etc-update
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-12-13 20:29:10 -0800
committerZac Medico <zmedico@gentoo.org>2010-12-13 20:29:10 -0800
commit25e39c5ee5873c54a038d8b6429cd7c8eb34f0db (patch)
treeb259f72669b5025baa421d65608ef5bab0b369eb /bin/etc-update
parent31e8a00dae63f956cec892cecb016a511de122fc (diff)
downloadportage-25e39c5ee5873c54a038d8b6429cd7c8eb34f0db.tar.gz
portage-25e39c5ee5873c54a038d8b6429cd7c8eb34f0db.tar.bz2
portage-25e39c5ee5873c54a038d8b6429cd7c8eb34f0db.zip
etc-update: eliminate duplicate example configs
Diffstat (limited to 'bin/etc-update')
-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