Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make ttree totals references (issue #325) #326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions lib/Template/App/ttree.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use strict;
use warnings;
use base 'Template::Base';

our $VERSION = '2.91';
our $VERSION = '2.92';

use Template;
use AppConfig qw( :expand );
Expand Down Expand Up @@ -265,12 +265,12 @@ sub run {
ignore => $ignore,
libdir => $libdir,
link => $link,
n_copy => $n_copy,
n_link => $n_link,
n_mkdir => $n_mkdir,
n_proc => $n_proc,
n_skip => $n_skip,
n_unmod => $n_unmod,
n_copy => \$n_copy,
n_link => \$n_link,
n_mkdir => \$n_mkdir,
n_proc => \$n_proc,
n_skip => \$n_skip,
n_unmod => \$n_unmod,
preserve => $preserve,
recurse => $recurse,
replace => $replace,
Expand Down Expand Up @@ -374,7 +374,7 @@ sub process_tree {
if ($path =~ /$check/) {
$self->emit_log( yellow(sprintf " - %-32s (ignored, matches /$check/)\n", $path ) )
if $verbose > 1;
$n_skip++;
$$n_skip++;
next FILE;
}
}
Expand All @@ -395,15 +395,15 @@ sub process_tree {
# commented out by abw on 2000/12/04 - seems to raise a warning?
# chown($uid, $gid, $target) || warn "chown($target): $!\n";

$n_mkdir++;
$$n_mkdir++;
$self->emit_log( green( sprintf " + %-32s (created target directory)\n", $path ) )
if $verbose;
}
# recurse into directory
$self->process_tree($path, $running_conf);
}
else {
$n_skip++;
$$n_skip++;
$self->emit_log( yellow(sprintf " - %-32s (directory, not recursing)\n", $path ) )
if $verbose > 1;
}
Expand Down Expand Up @@ -535,7 +535,7 @@ sub process_file {
unless (grep { $filename =~ /$_/ } @$accept) {
$self->emit_log( yellow( sprintf " - %-32s (not accepted)\n", $file ) )
if $verbose > 1;
$n_skip++;
$$n_skip++;
return;
}
}
Expand All @@ -560,7 +560,7 @@ sub process_file {
if ($desttime >= $srctime) {
$self->emit_log( yellow( sprintf " - %-32s (not modified)\n", $file ) )
if $verbose > 1;
$n_unmod++;
$$n_unmod++;
return;
}
}
Expand All @@ -577,7 +577,7 @@ sub process_file {
}

unless ($copy_file) {
$n_link++;
$$n_link++;
$self->emit_log( green( sprintf " > %-32s (linked, matches $check)\n", $file ) )
if $verbose;
return;
Expand All @@ -586,7 +586,7 @@ sub process_file {

# check against copy list
if ($copy_file) {
$n_copy++;
$$n_copy++;
unless ($dryrun) {
copy($absfile, $dest) or die red("Could not copy ($absfile to $dest) : $!\n");

Expand All @@ -602,7 +602,7 @@ sub process_file {
return;
}

$n_proc++;
$$n_proc++;

if ($verbose) {
$self->emit_log( green( sprintf " + %-32s", $file) );
Expand Down