Add a switch to disable the progress bar for capturing the output of findBrokenAssets.

This commit is contained in:
Colin Kuskie 2011-03-08 11:30:11 -08:00
parent dae7a145eb
commit 79aa44cf7e

View file

@ -23,7 +23,7 @@ BEGIN {
$|++; # disable output buffering $|++; # disable output buffering
our ( $configFile, $help, $man, $fix, $delete ); our ( $configFile, $help, $man, $fix, $delete, $no_progress );
use Pod::Usage; use Pod::Usage;
use Getopt::Long; use Getopt::Long;
use WebGUI::Session; use WebGUI::Session;
@ -35,6 +35,7 @@ GetOptions(
'man' => \$man, 'man' => \$man,
'fix' => \$fix, 'fix' => \$fix,
'delete' => \$delete, 'delete' => \$delete,
'noProgress' => \$no_progress,
); );
pod2usage( verbose => 1 ) if $help; pod2usage( verbose => 1 ) if $help;
@ -199,7 +200,7 @@ while ( my %row = $sth->hash ) {
} ## end else [ if ($fix) ] } ## end else [ if ($fix) ]
} ## end if ( !$asset ) } ## end if ( !$asset )
progress( $total, $count++ ); progress( $total, $count++ ) unless $no_progress;
} ## end while ( my %row = $sth->hash) } ## end while ( my %row = $sth->hash)
$sth->finish; $sth->finish;
$max_revision->finish; $max_revision->finish;