From a729e9c5ac317e08625d8a62e1ba4794623ab2c9 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 13 Dec 2010 20:29:10 -0800 Subject: [PATCH] etc-update: eliminate duplicate example configs --- bin/etc-update | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.26.2