- Timestamp:
- 2015-06-16T19:48:57+12:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/activate.pl
r29948 r29983 302 302 303 303 sub get_library_URL { 304 my $gs_mode = shift(@_); # gs3 or gs2304 my ($gs_mode, $lib_name) = @_; # gs_mode can be gs3 or gs2, lib_name is the custom servlet name 305 305 306 306 # If we get here, we are dealing with a server included with GS. … … 401 401 } else { 402 402 &print_msg("activate.pl::get_library_URL: Failed to run $perl_command to work out library URL for $gs_mode\n"); 403 } 403 } 404 if(defined $lib_name) { 405 # replace the servlet_name portion of the url found, with the given library_name 406 $url =~ s@/[^/]*$@/$lib_name@; 407 } 404 408 } 405 409 … … 479 483 print STDERR "\n"; 480 484 print STDERR "Usage: $progname [-collectdir c -builddir b -indexdir i -site s -skipactivation -removeold -keepold -verbosity v\n"; 481 print STDERR "\t-library_url URL ] <[colgroup/]collection>\n";485 print STDERR "\t-library_url URL -library_name n] <[colgroup/]collection>\n"; 482 486 print STDERR "\n"; 483 487 … … 502 506 # the GSDL_LIBRARY_URL env var is useful when running cmdline buildcol.pl in the linux package manager versions of GS3 503 507 508 my $library_name = undef; 509 504 510 while (my $arg = shift @argv) { 505 511 if ($arg eq "-collectdir") { … … 529 535 elsif ($arg eq "-library_url") { 530 536 $library_url = shift @argv; 537 } 538 elsif ($arg eq "-library_name") { 539 $library_name = shift @argv; 531 540 } 532 541 elsif ($arg eq "-verbosity") { … … 608 617 # and apache for GS2), we work out the library URL: 609 618 if(!$library_url) { 610 $library_url = &get_library_URL($gs_mode ); # returns undef if no server is running619 $library_url = &get_library_URL($gs_mode, $library_name); # returns undef if no server is running 611 620 } 612 621
Note:
See TracChangeset
for help on using the changeset viewer.