diff options
author | Ying Wang <wangying@android.com> | 2014-07-15 01:23:49 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-07-15 00:42:07 +0000 |
commit | 15d00664884b9b8ce4766ab3a7fd15b83cbeaad9 (patch) | |
tree | fb07d4896eb9f33dd51e8465968756110d9da2b5 | |
parent | c7f1389d2683be9068d22666b484e48abcff12f1 (diff) | |
parent | d28feb006605a791c01afe82544a756f90c5f9e9 (diff) | |
download | build-15d00664884b9b8ce4766ab3a7fd15b83cbeaad9.zip build-15d00664884b9b8ce4766ab3a7fd15b83cbeaad9.tar.gz build-15d00664884b9b8ce4766ab3a7fd15b83cbeaad9.tar.bz2 |
Merge "Revert "Fix Java detection on some Linux distributions""
-rwxr-xr-x | core/find-jdk-tools-jar.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/find-jdk-tools-jar.sh b/core/find-jdk-tools-jar.sh index d1b3ce9..f150a9a 100755 --- a/core/find-jdk-tools-jar.sh +++ b/core/find-jdk-tools-jar.sh @@ -2,9 +2,13 @@ if [ "x$ANDROID_JAVA_HOME" != x ] && [ -e "$ANDROID_JAVA_HOME/lib/tools.jar" ] ; then echo $ANDROID_JAVA_HOME/lib/tools.jar else - JAVAC=$(readlink -f $(which javac)) + JAVAC=$(which javac) if [ -z "$JAVAC" ] ; then exit 1 fi + while [ -L "$JAVAC" ] ; do + LSLINE=$(ls -l "$JAVAC") + JAVAC=$(echo -n "$LSLINE" | sed -e "s/.* -> //") + done echo $JAVAC | sed -e "s:\(.*\)/bin/javac.*:\\1/lib/tools.jar:" fi |