File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/compiler/scala/tools/ant/templates Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 9
9
# #############################################################################
10
10
11
11
findScalaHome () {
12
- # see # 2092
12
+ # see SI- 2092
13
13
local SOURCE=" ${BASH_SOURCE[0]} "
14
14
while [ -h " $SOURCE " ] ; do SOURCE=" $( readlink " $SOURCE " ) " ; done
15
- ( cd -P " $( dirname " $SOURCE " ) " /.. && pwd )
15
+ local bindir=" $( dirname " $SOURCE " ) "
16
+ if [[ -d " $bindir " /.. ]]; then
17
+ ( cd -P " $bindir " /.. && pwd )
18
+ else
19
+ # See SI-5792
20
+ local dir=$( dirname " ${BASH_SOURCE[0]} " )
21
+ local link=$( dirname " $( readlink " ${BASH_SOURCE[0]} " ) " )
22
+ local path=" $dir /$link /.."
23
+ ( cd " $path " && pwd )
24
+ fi
16
25
}
17
26
execCommand () {
18
27
[[ -n $SCALA_RUNNER_DEBUG ]] && echo " " && for arg in " $@ @" ; do echo " $arg " ; done && echo " " ;
You can’t perform that action at this time.
0 commit comments