Use find + xargs to avoid a potential 'Argument list too long' from bash. (trunk...
authorZac Medico <zmedico@gentoo.org>
Wed, 31 Jan 2007 00:10:30 +0000 (00:10 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 31 Jan 2007 00:10:30 +0000 (00:10 -0000)
svn path=/main/branches/2.1.2/; revision=5846

bin/ebuild.sh

index 3317996b452507117c3ff6c3f5220440e5abc448..aa3c1281fdb172a217ed48bbcc756c766b758c25 100755 (executable)
@@ -454,11 +454,9 @@ unpack() {
                                ;;
                esac
        done
-       local previous_dotglob=$(shopt -p dotglob)
        # Do not chmod '.' since it's probably ${WORKDIR} and PORTAGE_WORKDIR_MODE
        # should be preserved.
-       chmod -Rf a+rX,u+w,g-w,o-w *
-       eval ${previous_dotglob}
+       find . -mindepth 1 -print0 | ${XARGS} -0 chmod -f a+rX,u+w,g-w,o-w
 }
 
 strip_duplicate_slashes() {