From 79aa44cf7eee062fcaf136d85307f8843398d5d5 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 8 Mar 2011 11:30:11 -0800 Subject: [PATCH] Add a switch to disable the progress bar for capturing the output of findBrokenAssets. --- sbin/findBrokenAssets.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/findBrokenAssets.pl b/sbin/findBrokenAssets.pl index 2a162a2d8..9f074582d 100644 --- a/sbin/findBrokenAssets.pl +++ b/sbin/findBrokenAssets.pl @@ -23,7 +23,7 @@ BEGIN { $|++; # disable output buffering -our ( $configFile, $help, $man, $fix, $delete ); +our ( $configFile, $help, $man, $fix, $delete, $no_progress ); use Pod::Usage; use Getopt::Long; use WebGUI::Session; @@ -35,6 +35,7 @@ GetOptions( 'man' => \$man, 'fix' => \$fix, 'delete' => \$delete, + 'noProgress' => \$no_progress, ); pod2usage( verbose => 1 ) if $help; @@ -199,7 +200,7 @@ while ( my %row = $sth->hash ) { } ## end else [ if ($fix) ] } ## end if ( !$asset ) - progress( $total, $count++ ); + progress( $total, $count++ ) unless $no_progress; } ## end while ( my %row = $sth->hash) $sth->finish; $max_revision->finish;