'use strict' stuff from Nick Rees, plus some cleanup.

This commit is contained in:
Andrew Johnson
2006-11-17 22:53:03 +00:00
parent 6f361280c3
commit 3b481d69c2
2 changed files with 60 additions and 54 deletions

View File

@@ -481,13 +481,13 @@ sub GetUser {
# These functions are duplicated in configure/convertRelease.pl
sub UnixPath {
my ($newpath) = @_;
if ($^O eq "cygwin") {
$newpath =~ s|\\|/|go;
$newpath =~ s%^([a-zA-Z]):/%/cygdrive/$1/%;
if ($^O eq 'cygwin') {
$newpath =~ s{\\}{/}go;
$newpath =~ s{^([a-zA-Z]):/}{/cygdrive/$1/};
} elsif ($^O eq 'MSWin32') {
$newpath =~ s|\\|/|go;
$newpath =~ s{\\}{/}go;
} elsif ($^O eq 'sunos') {
$newpath =~ s(^\/tmp_mnt/)(/);
$newpath =~ s{^/tmp_mnt/}{/};
}
return $newpath;
}
@@ -495,10 +495,10 @@ sub UnixPath {
sub LocalPath {
my ($newpath) = @_;
if ($^O eq "cygwin") {
$newpath =~ s%^/cygdrive/([a-zA-Z])/%$1:/%;
$newpath =~ s{^/cygdrive/([a-zA-Z])/}{$1:/};
} elsif ($^O eq "darwin") {
# These rules are likely to be site-specific
$newpath =~ s%^/private/var/auto\.home/%/home/%; # APS
$newpath =~ s{^/private/var/auto\.home/}{/home/}; # APS
}
return $newpath;
}