summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/ant/templates/tool-unix.tmpl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
index d963d18873..da17878fbe 100644
--- a/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
+++ b/src/compiler/scala/tools/ant/templates/tool-unix.tmpl
@@ -30,7 +30,9 @@ while [ -h "$SOURCE" ]; do
SOURCE=`dirname "$SOURCE"`/${TARGET:-.};
fi;
done;
-SCALA_HOME=`dirname "$SOURCE"`/..;
+if [ "$SCALA_HOME" == "" ] then
+ SCALA_HOME=`dirname "$SOURCE"`/..;
+fi;
SCALA_HOME=`cd "$SCALA_HOME"; pwd`;
if $cygwin; then
SCALA_HOME=`cygpath --windows --short-name "$SCALA_HOME"`