Ignore:
Timestamp:
2011-08-09T17:35:09+12:00 (11 years ago)
Author:
ak19
Message:

Added in verbosity option when launching wvware.pl, so that an unnecessary message can be suppressed at lower verbosity levels.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/wvware.pl

    r24371 r24375  
    5050    my ($argc,@argv) = @_;
    5151
    52     if (($argc<2 || $argc>4)  || (($argc==1) && ($argv[0] =~ m/^--?h(elp)?$/))) {
     52    if (($argc<2 || $argc>5)  || (($argc==1) && ($argv[0] =~ m/^--?h(elp)?$/))) {
    5353    my ($progname) = ($0 =~ m/^.*[\/|\\](.*?)$/);
    5454
    5555    print STDERR "\n";
    56     print STDERR "Usage: $progname <input-filename> <output-filestem> [<fail-log-file>] [timeout]\n";
     56    print STDERR "Usage: $progname <input-filename> <output-filestem> [<fail-log-file>] [<verbosity>] [<timeout>]\n";
    5757    print STDERR "\n";
    5858
     
    6363    my $output_filestem = $argv[1];
    6464    my $faillogfile="";
    65     my $timeout=0;
     65    my $verbosity=0;
     66    my $timeout=0;
     67   
    6668    if($argc >= 3) {
    6769    $faillogfile= $argv[2];
    6870    }
    69     if($argc >= 4) {
    70     $timeout = $argv[3];
     71    if($argc >= 4) {
     72    $verbosity = $argv[3];
     73    }
     74    if($argc >= 5) {
     75    $timeout = $argv[4];
    7176    }
    7277
     
    8489        if(-d $gnome_dir) {
    8590        $ENV{'GEXTGNOME'} = $gnome_dir;
    86         } else {
    87         print STDERR "**** No gnome-lib(-minimal) ext folder detected.\n";
    88         print STDERR "**** Trying to run wvware without its libraries....\n";
     91        } elsif ($verbosity > 2) {
     92        print STDERR "No gnome-lib(-minimal) ext folder detected. Trying to run wvware without its libraries....\n";
    8993        }       
    9094    }
Note: See TracChangeset for help on using the changeset viewer.