fcopy and ignoring .svn directories when copying recursively

stan at stanandliz.net stan at stanandliz.net
Fri Nov 5 10:41:11 CET 2004


Hi Geert,

Thank you for your response.

I've tried with the backslashed escape, but it has no effect. Is there
anything else I can try?

(If this does not work, I will have to individually specify each file that
I need to fcopy in a shell script with a for statement. This is messy and
I would like to avoid this.)

Here is some sample output from fcopy when it hits the .svn dirs:


fcopy: no matching file for any class for root/.profile/.svn/tmp/wcprops
defined.
fcopy: no matching file for any class for root/.profile/.svn/tmp/props
defined.
fcopy: no matching file for any class for root/.profile/.svn/tmp/prop-base
defined.
fcopy: no matching file for any class for root/.profile/.svn/tmp/text-base
defined.

thanks

Stephen

> 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
>



More information about the linux-fai mailing list