fcopy and ignoring .svn directories when copying recursively

stan at stanandliz.net stan at stanandliz.net
Thu Nov 4 14:46:46 CET 2004


Hi

I'm using subversion to  keep tabs of the /usr/local/share/fai directory,
but have run into a problem when using fcopy recursively.

I know that fcopy is set to ignore CVS files/dirs (it says so in the man
page) so I tried to hack the perl from /usr/sbin/fcopy to accomodate .svn
dirs. However, I can't seem to get the code to ignore .svn files! (My perl
is not great.)

Here is the code:

sub rfilter {

  # Filter for recursive copying
  my $nlink;
  -d && ! ($_ =~ /^.*CVS$/) && ($nlink=(lstat($_))[3]) &&
    ( (-d 'CVS') && ($nlink==3) || ($nlink==2) ) &&
      push @rlist,$File::Find::name;
}

I have replaced CVS with '.'svn but when I run fcopy, my .svn files are 
not ignored and the fcopy fails.

What am I doing wrong?

thanks in advance. (Danke!)

Stephen






More information about the linux-fai mailing list