Changeset 28616 for other-projects

Show
Ignore:
Timestamp:
12.11.2013 19:39:41 (6 years ago)
Author:
sjm84
Message:

Beginnings of adding further cmdline args (svn/bin, gs2/gs3).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • other-projects/nightly-tasks/diffcol/trunk/task.pl

    r28615 r28616  
    5050my $use_blat = 0; # if we ever get blat to send mail/attachments on Windows working, set this to 1 
    5151 
     52my $install_type = "svn"; 
     53my $install_version = "2"; 
     54 
    5255my $use_local_rebuild = 0; # set to 1 (true) if just diffing and so we needn't copy model-collection over to the test collection again nor rebuild it (This is useful when having built the collection locally once before) 
    5356my $use_static_model = 0; # set to 1 (true) if working with a non-svn model-collection. Defaults to 1 if $use_local_rebuild is turned on 
     
    112115 
    113116# run_test can take any number of args 
    114 if(scalar(@ARGV) > 1 && $ARGV[0] ne "run_test") { 
     117if(scalar(@ARGV) > 1 && $ARGV[0] !~ m/run_test|setup_greenstone/) { 
    115118    print STDERR "**** Wrong number of arguments\n"; 
    116119    &printusage(); 
     
    131134    } 
    132135    } 
     136 
     137    # setup_greenstone can take gs2|gs3 and bin|svn. gs2 and svn by default 
    133138     
    134139    # run_test action can take a subaction: nosvn|justdiff. It can also take --modelOS (windows|linux|darwin) 
     
    136141    # it out from the svn model-collect again. 
    137142    # justdiff: same as nosvn, but doesn't copy over model-collection to collect, and doesn't rebuild either of them. Just does the diff part. 
    138     if($action eq "run_test" && scalar(@ARGV) >= 2) { 
     143    if($action eq "setup_greenstone" && scalar(@ARGV) >= 2) { 
     144                 
     145        for (my $i=0; $i < scalar(@ARGV); $i++) {  
     146            if($ARGV[$i] =~ m@^--@) {                    
     147            $subaction = $ARGV[$i]; 
     148            if($subaction =~ m/--gs(2|3)/) { 
     149                $install_version = $1; 
     150            } elsif ($subaction =~ m/--(bin|svn)/) { 
     151                $install_type = $1; 
     152            } else { 
     153                print STDERR "**** Bad subaction: ".$ARGV[$i]."\n";  
     154                &printusage;  
     155                exit -1; 
     156            } 
     157            } 
     158        } 
     159         
     160        #print STDERR "Install type $install_type\n"; 
     161        #print STDERR "Install version $install_version\n"; 
     162 
     163    } elsif($action eq "run_test" && scalar(@ARGV) >= 2) { 
    139164        push(@collections, @ARGV); 
    140165        shift @collections; # remove action from array 
     
    270295    print STDERR "\t--justdiff|--nosvn\n"; 
    271296    print STDERR "\t<col1 col2 ...>\n"; 
     297    print STDERR "where setup_greenstone can further take the following optional parameters:\n"; 
     298    print STDERR "\t--gs2|--gs3\n"; 
     299    print STDERR "\t--svn|--bin\n"; 
    272300} 
    273301