Changeset 24375


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.

Location:
main/trunk/greenstone2/bin/script
Files:
2 edited

Legend:

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

    r24371 r24375  
    9191my $faillogfile="";
    9292my $timeout=0;
     93my $verbosity=0;
    9394
    9495sub main
     
    131132    print_usage();
    132133    }
    133      
     134
     135    $verbosity=$verbose if defined $verbose;
     136     
    134137    # Make sure the input file exists and can be opened for reading
    135138    if (scalar(@ARGV!=1)) {
     
    521524
    522525    my $wvware_status = 0;
    523    
     526   
    524527    # need to ensure that the path to perl is quoted (in case there's spaces in it)
    525     my $launch_cmd = "\"".&util::get_perl_exec()."\" -S wvware.pl $input_filename $output_filestem $faillogfile $timeout";   
     528    my $launch_cmd = "\"".&util::get_perl_exec()."\" -S wvware.pl $input_filename $output_filestem $faillogfile $verbosity $timeout";   
    526529
    527530#    print STDERR "***** wvware launch cmd = $launch_cmd\n";
  • 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.