Changeset 28620 for other-projects/nightly-tasks/diffcol/trunk
- Timestamp:
- 2013-11-13T16:29:21+13:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/nightly-tasks/diffcol/trunk/task.pl
r28616 r28620 112 112 my $action = "all"; 113 113 my $subaction = ""; # run_test can take subactions: --just_diff and --no_svn 114 my @collections = (); 114 my @collections = (); # list of collections that run_test should process 115 116 if(scalar(@ARGV) == 0) { 117 $action="all"; 118 } 119 120 # process any arguments that are --gs2|--gs3 and --bin|--svn, and delete them from the array 121 # if none provided, it's gs2 and svn by default. 122 for (my $i = $#ARGV; $i >= 0; --$i) { 123 if($ARGV[$i] =~ m/--(bin|svn)/) { 124 $install_type = $1; 125 splice @ARGV, $i, 1; # remove the element from the argument array 126 } elsif($ARGV[$i] =~ m/--gs(2|3)/) { 127 $install_version = $1; 128 splice @ARGV, $i, 1; # remove the element from the argument array 129 } 130 } 131 115 132 116 133 # run_test can take any number of args 117 if(scalar(@ARGV) > 1 && $ARGV[0] !~ m/run_test|setup_greenstone/) {134 if(scalar(@ARGV) > 1 && $ARGV[0] ne "run_test") { 118 135 print STDERR "**** Wrong number of arguments\n"; 119 136 &printusage(); … … 121 138 } 122 139 123 if(scalar(@ARGV) == 0) { 124 $action="all"; 125 } 126 else { 140 if(scalar(@ARGV) > 0) { 127 141 switch ($ARGV[0]) { 128 142 case qr/^(-h|--?help|help)$/i { &printusage; exit 0; } … … 135 149 } 136 150 137 # setup_greenstone can take gs2|gs3 and bin|svn. gs2 and svn by default138 139 151 # run_test action can take a subaction: nosvn|justdiff. It can also take --modelOS (windows|linux|darwin) 140 152 # nosvn: uses the model-collect as static and copies it over to collect, rebuilding what's currently in model-collect instead of copying 141 153 # it out from the svn model-collect again. 142 154 # 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. 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) { 155 156 if($action eq "run_test" && scalar(@ARGV) >= 2) { 164 157 push(@collections, @ARGV); 165 158 shift @collections; # remove action from array … … 197 190 } 198 191 192 #print STDERR "Install type $install_type\n"; 193 #print STDERR "Install version $install_version\n"; 194 199 195 200 196 #check key environment vars are set
Note:
See TracChangeset
for help on using the changeset viewer.