I must've hit 'u' right before I exited vim... that patch
will cause a syntax error, because there is a unmatched brace...
Note to self: Never submit patches after midnight.
*thwaps self*
Here is the correct patch:
--- /usr/bin/ttree 2003-12-03 20:30:10.000000000 -0500
+++ /home/dylan/bin/ttree 2003-12-27 00:28:58.000000000 -0500
@@ -284,7 +284,8 @@
my ($dest, $destfile, $filename, $check,
$srctime, $desttime, $mode, $uid, $gid);
my ($old_suffix, $new_suffix);
- my $is_dep = 0;
+ my $is_dep = 0;
+ my $copy_file = 0;
$absfile ||= $file;
$filename = basename($file);
@@ -303,6 +304,15 @@
# print "proc $file => $dest\n";
+
+
+ # check against copy list
+ foreach $check (@$copy) {
+ if ($filename =~ /$check/) {
+ $copy_file = 1;
+ }
+ }
+
# stat the source file unconditionally, so we can preserve
# mode and ownership
(undef, undef, $mode, undef, $uid, $gid, undef, undef, undef, $srctime,
@@ -312,11 +322,11 @@
if (! $all && ! $options{ force } && -f $dest) {
$desttime = ( stat($dest) )[9];
- if (defined $depends) {
+ if (defined $depends and not $copy_file) {
my $deptime = depend_time($file, $depends);
if (defined $deptime && ($srctime < $deptime)) {
$srctime = $deptime;
- $is_dep = 1;
+ $is_dep = 1;
}
}
@@ -328,21 +338,19 @@
}
# check against copy list
- foreach $check (@$copy) {
- if ($filename =~ /$check/) {
- printf " > %-32s (copied, matches /$check/)\n", $file
- if $verbose;
-
- unless ($dryrun) {
- copy($absfile, $dest);
-
- if ($preserve) {
- chown($uid, $gid, $dest) || warn "chown($dest): $!\n";
- chmod($mode, $dest) || warn "chmod($dest): $!\n";
- }
+ if ($copy_file) {
+ printf " > %-32s (copied, matches /$check/)\n", $file
+ if $verbose;
+
+ unless ($dryrun) {
+ copy($absfile, $dest);
+
+ if ($preserve) {
+ chown($uid, $gid, $dest) || warn "chown($dest): $!\n";
+ chmod($mode, $dest) || warn "chmod($dest): $!\n";
}
- return;
}
+ return;
}
# check against acceptance list
--
Great acts are made up of small deeds.
-- Lao Tsu
-
GPG Fingerprint=D67D 2B75 53C6 9769 30E4 D390 239F C833 F32C F6F6
GPG KeyID=F32CF6F6
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates