diff options
author | Kurt Zenker <kz@openoffice.org> | 2010-11-05 16:40:54 +0100 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2010-11-05 16:40:54 +0100 |
commit | d0c56f12e437df77094652571025f88c722ca9da (patch) | |
tree | a678e023119d870db05c001ab50a101b8f26a9f1 | |
parent | 0a0bc5ee9809ffe0c0fb80527d9393385ba93708 (diff) | |
parent | 31e21f3789a79a182cf81fa0f120c9588612b852 (diff) |
CWS-TOOLING: integrate CWS jsc331
Notes
split repo tag: sdk_ooo/OOO330_m14
split repo tag: sdk_ooo/OOO330_m15
split repo tag: sdk_ooo/OOO330_m16
split repo tag: sdk_ooo/OOO330_m17
split repo tag: sdk_ooo/OOO330_m18
split repo tag: sdk_ooo/OOO330_m19
split repo tag: sdk_ooo/OOO330_m20
-rwxr-xr-x | odk/configure.pl | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/odk/configure.pl b/odk/configure.pl index 789cfac7cd76..e1a1cfb99924 100755 --- a/odk/configure.pl +++ b/odk/configure.pl @@ -5,6 +5,7 @@ # use IO::File; +use File::Basename; $main::hostname= $ARGV[0]; $main::sdkpath= $ARGV[1]; @@ -35,7 +36,7 @@ if ( $main::operatingSystem =~ m/darwin/ ) { # $main::OO_SDK_URE_HOME = `cd $main::sdkpath/../ure-link && pwd`; } else { - $main::OO_SDK_URE_HOME = `cd $main::sdkpath/../../ure && pwd`; + $main::OO_SDK_URE_HOME = `cd $main::sdkpath/../ure-link && pwd`; } chomp($main::OO_SDK_URE_HOME); @@ -554,15 +555,26 @@ sub resolveLink { my $base= shift; my $link= shift; - my $linktarget = readlink "$base/$link"; + + my $resolvedpath = "$base/$link"; + my $linktarget = readlink "$resolvedpath"; my $resolvedlink = ""; while ( $linktarget ne "") { - $link = $linktarget; - $linktarget = readlink "$base/$link"; + + if ( $linktarget =~ m/^\/.*/ ) + { + $resolvedpath = "$linktarget"; + } else { + $resolvedpath = `cd $base/$linktarget; pwd`; + chop $resolvedpath; } + $base = dirname("$resolvedpath"); - $resolvedlink = `cd $base/$link; pwd`; + $linktarget = readlink "$resolvedpath"; + } + + $resolvedlink = `cd $resolvedpath; pwd`; chop $resolvedlink; return $resolvedlink; } @@ -578,6 +590,7 @@ sub searchprog { if ( $main::operatingSystem =~ m/darwin/ ) { $progDir = resolveLink("/System/Library/Frameworks/JavaVM.Framework/Versions", "CurrentJDK"); + if ( -e "$progDir/$main::OO_SDK_JAVA_BIN_DIR/javac" ) { return "$progDir/$main::OO_SDK_JAVA_BIN_DIR"; |