Changeset 21687 for main/trunk/greenstone2
- Timestamp:
- 2010-01-27T20:54:06+13:00 (14 years ago)
- Location:
- main/trunk/greenstone2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/g2f-buildcol.pl
r18590 r21687 170 170 171 171 if (!$collectdir) { 172 ## my $collect_dir = util::filename_cat($ENV{'GREENSTONE3_HOME'},173 ## "web","sites","localsite","collect");174 175 176 $collectdir = util::filename_cat($ENV{'GSDLHOME'},"collect");172 if($ENV{'GSDL3HOME'}) { 173 $collectdir = &util::filename_cat($ENV{'GSDL3HOME'},"sites","localsite","collect"); 174 } else { 175 $collectdir = util::filename_cat($ENV{'GSDLHOME'},"collect"); 176 } 177 177 } 178 178 -
main/trunk/greenstone2/bin/script/g2f-import.pl
r18590 r21687 179 179 180 180 if (!$collectdir) { 181 # Explicitly set one 182 183 ## $collectdir = util::filename_cat($ENV{'GREENSTONE3_HOME'}, 184 ## "web","sites","localsite","collect"); 185 186 $collectdir = &util::filename_cat($ENV{'GSDLHOME'},"collect"); 187 188 } 189 190 # method that will tell Fedora where the ultimate output of g2f-import and g2f-build 191 # will be found: Points Fedora to the collect directory where FedoraMETS will be output. 192 &g2futil::write_gsdl_xml_file($hostname, $collectdir, $options); 181 # Explicitly set one, depending on whether it's GS2 or GS3 182 if($ENV{'GSDL3HOME'}) { 183 $collectdir = &util::filename_cat($ENV{'GSDL3HOME'},"sites","localsite","collect"); 184 } else { 185 $collectdir = &util::filename_cat($ENV{'GSDLHOME'},"collect"); 186 } 187 } 188 189 # if GS3, and if Fedora uses Greenstone's tomcat, then we do not need to write out the file gsdl.xml into Fedora's tomcat 190 my $localfedora = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "packages", "tomcat", "conf", "Catalina", "localhost", "fedora.xml"); 191 unless($ENV{'GSDL3SRCHOME'} && -e $localfedora) { 192 # method that will tell Fedora where the ultimate output of g2f-import and g2f-build 193 # will be found: Points Fedora to the collect directory where FedoraMETS will be output. 194 &g2futil::write_gsdl_xml_file($hostname, $collectdir, $options); 195 } 193 196 194 197 my $full_gs_col = &util::filename_cat($collectdir,$gs_col); -
main/trunk/greenstone2/perllib/g2futil.pm
r21588 r21687 291 291 # The top of this file has already made sure that FEDORA_HOME is set, but for GS3 292 292 # CATALINA_HOME is set to GS' own tomcat. Since we'll be working with fedora, we need 293 # to temporarily set CATALINA_HOME to fedora's tomcat. (Catalina is undefined for GS2 ).293 # to temporarily set CATALINA_HOME to fedora's tomcat. (Catalina is undefined for GS2.) 294 294 my $gs_catalina_home = $ENV{'CATALINA_HOME'} if defined $ENV{'CATALINA_HOME'}; 295 295 $ENV{'CATALINA_HOME'} = &util::filename_cat($ENV{'FEDORA_HOME'}, "tomcat"); … … 396 396 print STDERR "Fedora server restarted. Waiting for it to become ready...\n"; 397 397 #print STDERR "****$protocol://$hostname:$port/fedora/search\n"; 398 399 398 $! = 0; 400 401 399 #my $fedoraServerReady = system("wget -q --spider --waitretry=10 --tries=20 $protocol://$hostname:$port/fedora/search"); 400 402 401 # The retries above won't work if the server isn't running: 403 402 # http://www.gnu.org/software/wget/manual/wget.html … … 406 405 # with the exception of fatal errors like "connection refused" or "not found" (404), which ARE NOT RETRIED. 407 406 408 # retry fedora server every second for a total of 15times until the server is ready407 # retry fedora server every second for a total of 20 times until the server is ready 409 408 my $fedoraServerReady = 0; 410 409 my $count = 0; … … 416 415 #print STDERR "$count second(s)\n"; 417 416 } 418 } while($fedoraServerReady != 0 && $count < 15);417 } while($fedoraServerReady != 0 && $count < 20); 419 418 420 419 if($fedoraServerReady != 0) { -
main/trunk/greenstone2/perllib/plugouts/FedoraMETSPlugout.pm
r20414 r21687 543 543 $gsdl_href =~ s/^$collectparent(\/|\\)?//; # remove the collectparent path in gsdl_href and any trailing slash 544 544 $gsdl_href =~ s/\\/\//g; # make sure we have url paths (which only use / not \) 545 $gsdl_href = "/gsdl/$gsdl_href"; # prepend gsdl 545 my $localfedora = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "packages", "tomcat", "conf", "Catalina", "localhost", "fedora.xml"); 546 if($ENV{'GSDL3SRCHOME'} && -e $localfedora) { # prepend gsdl 547 $gsdl_href = "/greenstone3/sites/localsite/$gsdl_href"; # Fedora uses Greenstone's tomcat 548 } else { 549 $gsdl_href = "/gsdl/$gsdl_href"; 550 } 546 551 547 552 my $fserver = $ENV{'FEDORA_HOSTNAME'}; … … 550 555 my $fdomain = "http://$fserver:$fport"; 551 556 $xlink_href = "$fdomain$gsdl_href"; 552 } 553 557 #ERROR: $xlink_href = "$fname"; 558 } 554 559 555 560 return $xlink_href; … … 674 679 $gsdl_href =~ s/^$collectparent(\/|\\)?//; # remove the collectparent path in gsdl_href and any trailing slash 675 680 $gsdl_href =~ s/\\/\//g; # make sure we have url paths (which only use / not \) 676 $gsdl_href = "/gsdl/$gsdl_href"; # prepend gsdl 681 my $localfedora = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "packages", "tomcat", "conf", "Catalina", "localhost", "fedora.xml"); 682 if($ENV{'GSDL3SRCHOME'} && -e $localfedora) { # prepend gsdl 683 $gsdl_href = "/greenstone3/sites/localsite/$gsdl_href"; # Fedora uses Greenstone's tomcat 684 } else { 685 $gsdl_href = "/gsdl/$gsdl_href"; 686 } 677 687 678 688 my $fserver = $ENV{'FEDORA_HOSTNAME'}; … … 681 691 my $fdomain = "http://$fserver:$fport"; 682 692 $xlink_href = "xlink:href=\"$fdomain$gsdl_href\""; 693 #ERROR: $xlink_href = "xlink:href=\"$assfilePath\""; 683 694 } 684 695
Note:
See TracChangeset
for help on using the changeset viewer.