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

Author: zmedico
Date: 2008-10-05 03:39:27 +0000 (Sun, 05 Oct 2008)
New Revision: 11623

Modified:
   main/trunk/bin/doins
Log:
Bug #239529 - Fix 'doins' to work with symlinks to directories, like it did
before the changes from bug #210575.


Modified: main/trunk/bin/doins
===================================================================
--- main/trunk/bin/doins	2008-10-05 02:17:18 UTC (rev 11622)
+++ main/trunk/bin/doins	2008-10-05 03:39:27 UTC (rev 11623)
@@ -64,9 +64,17 @@
 		else
 			pushd "${x%/*}" >/dev/null
 		fi
-		find "${x##*/}" -type d -exec dodir "${INSDESTTREE}/{}" \;
-		find "${x##*/}" \( -type f -or -type l \) -print0 | _xdoins
-		popd >/dev/null
+		x=${x##*/}
+		# Follow any symlinks recursively until we've got
+		# a normal directory for 'find' to traverse.
+		while [ -L "$x" ] ; do
+			pushd "$(readlink "$x")"
+			x=${PWD##*/}
+			pushd ${PWD%/*}
+		done
+		find "$x" -type d -exec dodir "${INSDESTTREE}/{}" \;
+		find "$x" \( -type f -or -type l \) -print0 | _xdoins
+		while popd >/dev/null ; do true ; done
 		((++success))
 	else
 		_doins "${x}" && ((++success))




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

only message in thread, other threads:[~2008-10-05  3:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-05  3:39 [gentoo-commits] portage r11623 - 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