public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r11928 - main/trunk/bin
@ 2008-11-15  5:59 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-11-15  5:59 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-11-15 05:59:45 +0000 (Sat, 15 Nov 2008)
New Revision: 11928

Modified:
   main/trunk/bin/etc-update
Log:
Bug #173284 - Do not traverse hidden directories such as .svn or .git when
search for protected files.


Modified: main/trunk/bin/etc-update
===================================================================
--- main/trunk/bin/etc-update	2008-11-15 05:09:42 UTC (rev 11927)
+++ main/trunk/bin/etc-update	2008-11-15 05:59:45 UTC (rev 11928)
@@ -50,17 +50,19 @@
 
 	for path in ${CONFIG_PROTECT} ; do
 		path="${ROOT}${path}"
-		find_opts="-iname ._cfg????_*"
+		# Do not traverse hidden directories such as .svn or .git.
+		find_opts="-name .* -type d -prune -o -name ._cfg????_*"
 		if [ ! -d "${path}" ]; then
 			[ ! -f "${path}" ] && continue
 			my_basename="${path##*/}"
 			path="${path%/*}"
-			find_opts="-maxdepth 1 -iname ._cfg????_${my_basename}"
+			find_opts="-maxdepth 1 -name ._cfg????_${my_basename}"
 		fi
 
 		ofile=""
 		# The below set -f turns off file name globbing in the ${find_opts} expansion.
-		for file in $(set -f; find ${path}/ ${find_opts} ! -iname '.*~' ! -iname '.*.bak' |
+		for file in $(set -f ; find ${path}/ ${find_opts} \
+		       ! -name '.*~' ! -iname '.*.bak' -print |
 			   sed -e "s:\(^.*/\)\(\._cfg[0-9]*_\)\(.*$\):\1\2\3\%\2\%\3:" |
 			   sort -t'%' -k3 -k2 | LANG=POSIX LC_ALL=POSIX cut -f1 -d'%'); do
 




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-11-15  5:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-15  5:59 [gentoo-commits] portage r11928 - main/trunk/bin Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox