Subversion Repositories DevTools

Rev

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

Rev 4421 Rev 4546
Line 98... Line 98...
98
our $ScmHost   ;                # Host Type. Unix, WIN
98
our $ScmHost   ;                # Host Type. Unix, WIN
99
 
99
 
100
#
100
#
101
#   Internal variables
101
#   Internal variables
102
#
102
#
103
my  $isCygWin;                 # Running under CygWin
103
our  $isCygWin;                 # Running under CygWin
104
my  $isUnix;                   # Is Unix
104
our  $isUnix;                   # Is Unix
105
            
105
            
106
#-------------------------------------------------------------------------------
106
#-------------------------------------------------------------------------------
107
# Function        : BEGIN
107
# Function        : BEGIN
108
#
108
#
109
# Description     : Determine some values very early
109
# Description     : Determine some values very early
Line 116... Line 116...
116
    Debug( "PerlHost:  $^O" );
116
    Debug( "PerlHost:  $^O" );
117
    $ScmHost = "DOS"      if ($^O eq "win95");        # DOS Perl dependent
117
    $ScmHost = "DOS"      if ($^O eq "win95");        # DOS Perl dependent
118
    $ScmHost = "WIN"      if ($^O eq "MSWin32");      # ActivePerl
118
    $ScmHost = "WIN"      if ($^O eq "MSWin32");      # ActivePerl
119
    $ScmHost = "WIN"      if ($^O eq "cygwin");       # Cygwin
119
    $ScmHost = "WIN"      if ($^O eq "cygwin");       # Cygwin
120
 
120
 
121
    $isUnix = 1 if ( $ScmHost eq "Unix"  );
121
    $isUnix = ( $ScmHost eq "Unix"  ) ? 1 : 0;
122
    $isCygWin = 1 if ( $ENV{'SHELL'} || $ENV{'CYGWIN'} );
122
    $isCygWin = ( $ENV{'SHELL'} || $ENV{'CYGWIN'} ) ? 1 : 0;
123
 
123
 
124
    $ScmPathSep = $isUnix ? ':' : ';';     # Unix / Windows
124
    $ScmPathSep = $isUnix ? ':' : ';';     # Unix / Windows
125
    $ScmDirSep = $isUnix ? '/' : '\\';     # Unix / Windows
125
    $ScmDirSep = $isUnix ? '/' : '\\';     # Unix / Windows
126
}
126
}
127
 
127
 
Line 868... Line 868...
868
    my ($path) = @_;
868
    my ($path) = @_;
869
    if ( ! $isUnix && ! $isCygWin )
869
    if ( ! $isUnix && ! $isCygWin )
870
    {
870
    {
871
        $path =~ s~/~\\~g;
871
        $path =~ s~/~\\~g;
872
    }
872
    }
-
 
873
    else
-
 
874
    {
-
 
875
        $path =~ s~\\~/~g;
-
 
876
    }
873
    return $path;
877
    return $path;
874
}
878
}
875
 
879
 
876
#-------------------------------------------------------------------------------
880
#-------------------------------------------------------------------------------
877
# Function        : RmDirTree
881
# Function        : RmDirTree