$os_name = $^O;

if ($os_name =~ "linux") {
    $ENV{'IDENTITY_DIR'} = "/root/.ssh";
    $ENV{'munges'} = "";
    $ENV{'TASK_HOME'} = "/greenstone/diffcol"; # "/greenstone/envi/etc/tasks/diffcol";
}

if ($os_name =~ "MSWin32") {
	my $home_dir = "C:\\greenstone\\gs-release-builder";
	
    #diffcol Win environment
    $ENV{'IDENTITY_DIR'} = "$home_dir\\keys";
    $ENV{'munges'} = "";
    $ENV{'TASK_HOME'} = "$home_dir\\diffcol";
    #$ENV{'GSDLHOME'} = "$ENV{'TASK_HOME'}\\greenstone2" unless defined $ENV{'GSDLHOME'};
    
    # need the correct perl on the PATH in order to be able to run import.pl from within diffcol\task.pl via envi 
    # (else calling 'envi.pl diffcol run_test' used to fail on the first GS script, import)
    ##$ENV{'PERLPATH'}="C:\\Perl64\\bin";
    #$ENV{'PATH'}="C:\\Perl64\\bin;$ENV{'PATH'}";
    
    #$ENV{'ANT_HOME'}="C:\\Users\\GameJam\\apache-ant-1.9.5";
    #$ENV{'JAVA_HOME'}="C:\\Program Files\\Java\\jdk1.8.0_191";
    #$ENV{'PATH'}="$home_dir\\strawberry-perl32no64\\perl\\bin;$ENV{'ANT_HOME'}\\bin;$ENV{'JAVA_HOME'}\\bin;C:\\Program Files\\SlikSvn\\bin;$ENV{'PATH'}";
    
    # Need path to UNIXtools/linux utilities and must have GS3/gs2build/bin/windows' wget in there and wgetrc file
	# https://unxutils.sourceforge.net/
	# ( https://gnuwin32.sourceforge.net/packages/coreutils.htm )
	
	$ENV{'PATH'}="$home_dir\\UnxUpdates;$ENV{'PATH'}";
}

if ($os_name =~ "darwin") {
    $ENV{'IDENTITY_DIR'} = "/Users/greenstone/.ssh";    
    $ENV{'munges'} = "";
    $ENV{'TASK_HOME'} = "/Users/greenstone/RELEASES/diffcol";

    $ENV{'ANT_HOME'} = "$ENV{'RELEASES_DIR'}/ant-1.9.4";

    #$ENV{'JRE_HOME'} = "$ENV{RELEASES_DIR}/JDK8u301/Home/jre";
    #$ENV{'PATH'} = "$ENV{'PATH'}:$ENV{'JRE_HOME'}/bin:$ENV{'ANT_HOME'}/bin";
    $ENV{'PATH'} = "$ENV{'ANT_HOME'}/bin:$ENV{'PATH'}";
}
