diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-10-05 03:39:27 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-10-05 03:39:27 +0000 |
commit | 27e53dd580dee05368f26ff76ada5b3a244d6c0c (patch) | |
tree | e51bdeac7618a06bd6201be0a924e2badf5502c3 | |
parent | 624166fa9f269367769ac0beb96908727a4c9d1a (diff) | |
download | portage-27e53dd580dee05368f26ff76ada5b3a244d6c0c.tar.gz portage-27e53dd580dee05368f26ff76ada5b3a244d6c0c.tar.bz2 portage-27e53dd580dee05368f26ff76ada5b3a244d6c0c.zip |
Bug #239529 - Fix 'doins' to work with symlinks to directories, like it did
before the changes from bug #210575.
svn path=/main/trunk/; revision=11623
-rwxr-xr-x | bin/doins | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -64,9 +64,17 @@ for x in "$@" ; do 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)) |