fcopy and ignoring .svn directories when copying recursively

Geert Stappers stappers at stappers.nl
Fri Nov 5 00:21:50 CET 2004


On Thu, Nov 04, 2004 at 01:46:46PM -0000, stan at stanandliz.net wrote:
> 
> 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?

try  \.svn      (  a dot is a wildcard, the backslash escapes it )

> thanks in advance. (Danke!)

Report your results back.

> 
> Stephen

Geert Stappers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20041105/4d3dd2e9/attachment.bin 


More information about the linux-fai mailing list