Changeset 25573 for main/trunk/greenstone2
- Timestamp:
- 2012-05-10T21:32:52+12:00 (12 years ago)
- Location:
- main/trunk/greenstone2
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/buildcol.pl
r25553 r25573 238 238 'reqd' => "no", 239 239 'hiddengli' => "yes" }, 240 { 'name' => "activate", 241 'desc' => "{buildcol.activate}", 242 'type' => "flag", 243 'reqd' => "no", 244 'hiddengli' => "yes" }, 240 245 ]; 241 246 … … 301 306 $no_strip_html, $store_metadata_coverage, 302 307 $no_text, $faillog, $gli, $index, $language, 303 $sections_index_document_metadata, $maxnumeric );304 308 $sections_index_document_metadata, $maxnumeric, $activate); 309 305 310 my $xml = 0; 306 311 my $hashParsingResult = {}; … … 682 687 } 683 688 689 # if buildcol.pl was run with -activate, need to run activate.pl 690 # now that building's complete 691 if($activate) { 692 693 #my $quoted_argv = join(" ", map { "\"$_\"" } @ARGV); 694 695 my @activate_argv = (); 696 push(@activate_argv,"-collectdir","$collectdir") if($collectdir); 697 push(@activate_argv,"-builddir","$builddir") if($builddir); 698 push(@activate_argv,"-site","$site") if($site); 699 push(@activate_argv,"-removeold") if($removeold); 700 push(@activate_argv,"-keepold") if($keepold); 701 my $quoted_argv = join(" ", map { "\"$_\"" } @activate_argv); 702 703 my $activatecol_cmd = "\"".&util::get_perl_exec()."\" -S activate.pl $quoted_argv \"$collection\""; 704 705 my $activatecol_status = system($activatecol_cmd)/256; 706 707 if ($activatecol_status != 0) { 708 print STDERR "Error: Failed to run: $activatecol_cmd\n"; 709 print STDERR " $!\n" if ($! ne ""); 710 exit(-1); 711 } 712 } 713 684 714 close OUT if $close_out; 685 715 close FAILLOG; -
main/trunk/greenstone2/bin/script/full-rebuild.pl
r24747 r25573 32 32 # (assumming import.pl did not end with an error) 33 33 34 # The -keepold argument can be passed into this script since this calls activate.pl 35 # And activate.pl allows the contents of a src dir to be moved into the dest_dir 36 # without destroying other (uniquely-named) contents of dest_dir. 34 37 35 38 BEGIN { … … 43 46 44 47 48 # This subroutine has been replaced by a call to activate.pl in sub main 45 49 sub full_replace 46 50 { … … 119 123 my @import_argv = (); 120 124 my @buildcol_argv = (); 125 my @activate_argv = (); 121 126 122 127 my $site = undef; … … 130 135 push(@import_argv,$arg,$site); 131 136 push(@buildcol_argv,$arg,$site); 137 push(@activate_argv,$arg,$site); 132 138 } 133 139 elsif ($arg eq "-collectdir") { … … 135 141 push(@import_argv,$arg,$collect_dir); 136 142 push(@buildcol_argv,$arg,$collect_dir); 143 push(@activate_argv,$arg,$collect_dir); 137 144 } 138 145 elsif ($arg eq "-importdir") { … … 142 149 } 143 150 elsif ($arg eq "-builddir") { 144 # only makes sense in buildcol.pl 151 # only makes sense in buildcol.pl and activate.pl 145 152 $build_dir = shift @argv; 146 153 push(@buildcol_argv,$arg,$build_dir); 154 push(@activate_argv,$arg,$build_dir); 147 155 } 148 156 elsif ($arg eq "-indexdir") { 149 # only makes sense in buildcol.pl 157 # only makes sense in buildcol.pl and activate.pl 150 158 $index_dir = shift @argv; 151 159 push(@buildcol_argv,$arg,$index_dir); 160 push(@activate_argv,$arg,$index_dir); 152 161 } 153 162 else { 154 163 push(@import_argv,$arg); 155 164 push(@buildcol_argv,$arg); 165 push(@activate_argv,$arg); 156 166 } 157 167 } … … 160 170 my $quoted_import_argv = join(" ", map { "\"$_\"" } @import_argv); 161 171 my $quoted_buildcol_argv = join(" ", map { "\"$_\"" } @buildcol_argv); 172 my $quoted_activate_argv = join(" ", map { "\"$_\"" } @activate_argv); 162 173 163 174 my $final_status = 0; … … 186 197 if ($buildcol_status == 0) { 187 198 188 full_replace($site,$collect_dir,$collect,$build_dir,$index_dir); 199 #full_replace($site,$collect_dir,$collect,$build_dir,$index_dir); 200 my $activatecol_cmd = $launch_cmd . "activate.pl $quoted_activate_argv \"$collect\""; 201 my $activatecol_status = system($activatecol_cmd)/256; 189 202 } 190 203 else { -
main/trunk/greenstone2/perllib/strings.properties
r24854 r25573 72 72 73 73 # -- buildcol.pl -- 74 75 buildcol.activate:Run activate.pl after buildcol has finished, which will move building to index. 74 76 75 77 buildcol.archivedir:Where the archives live.
Note:
See TracChangeset
for help on using the changeset viewer.