Changeset 23314


Ignore:
Timestamp:
2010-11-10T16:45:13+13:00 (11 years ago)
Author:
sjm84
Message:

Katherine discovered that the newly added sub setup_greenstone_env needs to clear the GSDLHOME env variable before calling setup.bash (otherwise calling setup.bash/bat terminates assuming that the GS environment was already set up.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/util.pm

    r23307 r23314  
    13881388    #my %env_map = ();
    13891389    # Get the localised ENV settings of running a localised source setup.bash
    1390     # and put it into the ENV here.
    1391     my $perl_command = "(cd $GSDLHOME; . ./setup.bash > /dev/null; env)";
     1390    # and put it into the ENV here. Need to clear GSDLHOME before running setup
     1391    #my $perl_command = "(cd $GSDLHOME; export GSDLHOME=; . ./setup.bash > /dev/null; env)";
     1392    my $perl_command = "(cd $GSDLHOME; /bin/bash -c \"export GSDLHOME=; source setup.bash > /dev/null; env\")";     
    13921393    if($GSDLOS =~ m/windows/i) {
    1393         #$perl_command = "(cmd && cd $GSDLHOME && setup.bat > nul && set && exit)";
    1394         $perl_command = "(cd $GSDLHOME && setup.bat > nul && set)";
     1394        #$perl_command = "cmd /C \"cd $GSDLHOME&& set GSDLHOME=&& setup.bat > nul&& set\"";
     1395        $perl_command = "(cd $GSDLHOME&& set GSDLHOME=&& setup.bat > nul&& set)";
    13951396    }
    13961397    if (!open(PIN, "$perl_command |")) {
Note: See TracChangeset for help on using the changeset viewer.