fcopy and ignoring .svn directories when copying recursively

Steffen Grunewald steffen.grunewald at aei.mpg.de
Fri Nov 5 11:12:31 CET 2004


Hi,

On Fri, Nov 05, 2004 at 09:41:11AM -0000, stan at stanandliz.net wrote:
> I've tried with the backslashed escape, but it has no effect. Is there
> anything else I can try?
> >> sub rfilter {
> >>
> >>   # Filter for recursive copying
> >>   my $nlink;
> >>   -d && ! ($_ =~ /^.*CVS$/) && ($nlink=(lstat($_))[3]) &&
> >>     ( (-d 'CVS') && ($nlink==3) || ($nlink==2) ) &&
> >>       push @rlist,$File::Find::name;
> >> }

If (as I suppose) subversion internal information is stored in a .svn/
directory in every subdir of the tree, then the fifth line should be
replaced by

-d && ! ($_ =~ /^.*CVS$/) && ! ($_ =~ /^.*\.svn/) && ($nlink=(lstat($_))[3]) &&

(question to Thomas: shouldn't there be a \/ prepended to CVS - and .svn ?)

Cheers,
 Steffen

-- 
Steffen Grunewald * * * Merlin cluster admin (http://pandora.aei.mpg.de)
Albert-Einstein-Institut (MPI Gravitationsphysik, http://www.aei.mpg.de)
       Science Park Golm, Am Mühlenberg 1, 14476 Potsdam, Germany
e-mail: steffen.grunewald(*)aei.mpg.de * +49-331-567-{fon:7233,fax:7298}



More information about the linux-fai mailing list