[Templates-cvs] cvs commit: Template2/bin ttree
cvs@template-toolkit.org
cvs@template-toolkit.org
Thu, 11 Mar 2004 08:04:19 +0000
cvs 04/03/11 08:04:19
Modified: bin ttree
Log:
* applied patch from Harald Joerg to prevent warnings when copying files.
http://template-toolkit.org/pipermail/templates/2004-March/005897.html
Revision Changes Path
2.77 +8 -8 Template2/bin/ttree
Index: ttree
===================================================================
RCS file: /template-toolkit/Template2/bin/ttree,v
retrieving revision 2.76
retrieving revision 2.77
diff -u -r2.76 -r2.77
--- ttree 2004/01/30 19:30:49 2.76
+++ ttree 2004/03/11 08:04:18 2.77
@@ -23,7 +23,7 @@
#
#------------------------------------------------------------------------
#
-# $Id: ttree,v 2.76 2004/01/30 19:30:49 abw Exp $
+# $Id: ttree,v 2.77 2004/03/11 08:04:18 abw Exp $
#
#========================================================================
@@ -37,7 +37,7 @@
use Text::ParseWords qw(quotewords);
my $NAME = "ttree";
-my $VERSION = sprintf("%d.%02d", q$Revision: 2.76 $ =~ /(\d+)\.(\d+)/);
+my $VERSION = sprintf("%d.%02d", q$Revision: 2.77 $ =~ /(\d+)\.(\d+)/);
my $HOME = $ENV{ HOME } || '';
my $RCFILE = $ENV{"\U${NAME}rc"} || "$HOME/.${NAME}rc";
my $TTMODULE = 'Template';
@@ -315,20 +315,20 @@
$dest = $destdir ? "$destdir/$destfile" : $destfile;
# print "proc $file => $dest\n";
-
-
# check against copy list
- foreach $check (@$copy) {
- if ($filename =~ /$check/) {
+ foreach my $copy_pattern (@$copy) {
+ if ($filename =~ /$copy_pattern/) {
$copy_file = 1;
+ $check = $copy_pattern;
+ last;
}
}
# stat the source file unconditionally, so we can preserve
# mode and ownership
- (undef, undef, $mode, undef, $uid, $gid, undef, undef, undef, $srctime,
- undef, undef, undef) = stat($absfile);
+ ( undef, undef, $mode, undef, $uid, $gid, undef,
+ undef, undef, $srctime, undef, undef, undef ) = stat($absfile);
# test modification time of existing destination file
if (! $all && ! $options{ force } && -f $dest) {