Subversion Repositories DevTools

Rev

Rev 6403 | Rev 7009 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6403 Rev 6898
Line 931... Line 931...
931
 
931
 
932
################################################################################
932
################################################################################
933
#   Setup the default JAVA_HOME
933
#   Setup the default JAVA_HOME
934
#   User should specify 1.4, 1.5,1.6 ....
934
#   User should specify 1.4, 1.5,1.6 ....
935
#
935
#
936
$JAVA_HOME = get_java_home ($opt_java)
936
$JAVA_HOME = get_java_home ($opt_java) if ( $opt_java );
937
    if ( $opt_java );
-
 
938
PathPrepend ("$JAVA_HOME/bin")
937
PathPrepend ("$JAVA_HOME/bin") if ( -d $JAVA_HOME );
939
    if ( -d $JAVA_HOME );
-
 
940
 
938
 
941
################################################################################
939
################################################################################
942
#   Setup GBE_VIEWBASE
940
#   Setup GBE_VIEWBASE
943
#   Ideally this should be configured externally
941
#   Ideally this should be configured externally
944
#
942
#
Line 970... Line 968...
970
#   Also ensure that we pickup our version of utilities instead of random
968
#   Also ensure that we pickup our version of utilities instead of random
971
#   versions.
969
#   versions.
972
#
970
#
973
PathPrepend ($GBE_BIN);
971
PathPrepend ($GBE_BIN);
974
 
972
 
-
 
973
 
-
 
974
################################################################################
-
 
975
# Under Windows - ensure that cmd.exe (or equivelent) is in the PATH
-
 
976
# Cygwin may remove it
-
 
977
# 
-
 
978
unless ( $GBE_JATS_SANE || $GBE_UNIX ) {
-
 
979
    if (exists $ENV{COMSPEC}) {
-
 
980
        $ENV{COMSPEC} =~ m~(.*)[\\/][^\\/]+~;
-
 
981
        $PATH = $PATH . $PSPLIT . $1;
-
 
982
    }
-
 
983
}
-
 
984
 
975
################################################################################
985
################################################################################
976
#   Clean PATH
986
#   Clean PATH
977
#       Remove duplicates
987
#       Remove duplicates
978
#       Remove empty elements
988
#       Remove empty elements
979
#       Clean path endings
989
#       Clean path endings
Line 981... Line 991...
981
#
991
#
982
{
992
{
983
    my @new_path;
993
    my @new_path;
984
    my @non_exist;
994
    my @non_exist;
985
    my %seen;
995
    my %seen;
986
    foreach ( split $PSPLIT, $PATH )
996
    foreach ( split($PSPLIT, $PATH) )
987
    {
997
    {
988
        s~[/\\]+$~~;                                # Remove trailing / or \
998
        s~[/\\]+$~~;                                # Remove trailing / or \
989
        my $name = ( $GBE_UNIX ) ? $_ : lc ($_);    # Windows is case insensitive
999
        my $name = ( $GBE_UNIX ) ? $_ : lc ($_);    # Windows is case insensitive
990
        next unless ( $_ );                         # Remove empty elements
1000
        next unless ( $_ );                         # Remove empty elements
991
        next if ( /^\.+$/ );                        # Remove . and ..
1001
        next if ( /^\.+$/ );                        # Remove . and ..