diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-12-13 20:29:10 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-12-13 20:29:10 -0800 |
commit | 25e39c5ee5873c54a038d8b6429cd7c8eb34f0db (patch) | |
tree | b259f72669b5025baa421d65608ef5bab0b369eb | |
parent | 31e8a00dae63f956cec892cecb016a511de122fc (diff) | |
download | portage-25e39c5ee5873c54a038d8b6429cd7c8eb34f0db.tar.gz portage-25e39c5ee5873c54a038d8b6429cd7c8eb34f0db.tar.bz2 portage-25e39c5ee5873c54a038d8b6429cd7c8eb34f0db.zip |
etc-update: eliminate duplicate example configs
-rwxr-xr-x | bin/etc-update | 6 |
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 |