On Wed, Nov 02, 2011 at 07:13:48PM -0700, Linus Arver wrote: > On Wed, Nov 02, 2011 at 09:03:37PM -0400, Dave Reisner wrote: > > On Wed, Nov 02, 2011 at 05:52:37PM -0700, Linus Arver wrote: > > > The bzr, darcs, git, and hg version control systems use a single > > > internal folder at the root to store all VCS-related data (commits, > > > history, etc.). This folder can get quite large (hundreds of MiB) for > > > big projects and continues to grow as the project lives on. > > > > > > We exclude this folder when creating a temporary build directory to save > > > time and space. > > > > > > CVS and SVN pollute the source repo with "CVS" and ".svn" directories > > > recursively for every single directory, so there is no simple one-liner > > > solution to exclude the VCS data for these systems. > > > > > > Signed-off-by: Linus Arver <[email protected]> > > > --- > > > prototypes/PKGBUILD-bzr.proto | 6 ++++-- > > > prototypes/PKGBUILD-darcs.proto | 6 ++++-- > > > prototypes/PKGBUILD-git.proto | 6 ++++-- > > > prototypes/PKGBUILD-hg.proto | 6 ++++-- > > > 4 files changed, 16 insertions(+), 8 deletions(-) > > > > > > diff --git a/prototypes/PKGBUILD-bzr.proto b/prototypes/PKGBUILD-bzr.proto > > > index a01eea8..ef7187d 100644 > > > --- a/prototypes/PKGBUILD-bzr.proto > > > +++ b/prototypes/PKGBUILD-bzr.proto > > > @@ -47,8 +47,10 @@ build() { > > > msg "Starting build..." > > > > > > rm -rf "$_bzrmod-build" > > > - cp -r "$_bzrmod" "$_bzrmod-build" > > > - cd "$_bzrmod-build" > > > + mkdir $_bzrmod-build > > > + cd $_bzrmod > > > + ls -A | grep -v .bzr | xargs -d '\n' cp -r -t ../"$_bzrmod-build" > > > > Oh hell no. We are not parsing ls here. This can be done without the > > need for grep and findutils as well, e.g. > > > > mkdir "$_bzrmod-build" > > cp -a "$_bzrmod"/!(.bzr) "$_bzrmod-build" > > > > Note the proper quoting here, too, that you've stripped. > > Hmm, I just did some tests, but the "!(.bzr)" syntax that you used gives > me a parse error.
Yes, it's a syntax error when extglob isn't enabled. We provide this by default in makepkg, so PKGBUILDs will inherit it.
pgpcn2mUiey95.pgp
Description: PGP signature
