Ignore:
Timestamp:
2010-01-27T20:54:06+13:00 (14 years ago)
Author:
ak19
Message:
  1. Minor changes for when when fedora uses Greenstone 3's tomcat: Only for GS3 in this case, don't need the file gsdl.xml since the file greenstone3.xml in GS3's tomcat already contains the necessary information. 2. In g2futil.pm: When writing out the file gsdl.xml, tries for 1 x 20 seconds to see whether the fedora server has started up again.
Location:
main/trunk/greenstone2/bin/script
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/g2f-buildcol.pl

    r18590 r21687  
    170170
    171171    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    }
    177177    }
    178178
  • main/trunk/greenstone2/bin/script/g2f-import.pl

    r18590 r21687  
    179179
    180180    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    }
    193196
    194197    my $full_gs_col = &util::filename_cat($collectdir,$gs_col);
Note: See TracChangeset for help on using the changeset viewer.