Angus Lees | 4cf7606 | 2009-01-30 10:17:23 +0000 | [diff] [blame] | 1 | if [ "x$ANDROID_JAVA_HOME" != x ] && [ -e "$ANDROID_JAVA_HOME/lib/tools.jar" ] ; then |
The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 2 | echo $ANDROID_JAVA_HOME/lib/tools.jar |
| 3 | else |
| 4 | JAVAC=$(which javac) |
Rod Whitby | 3caa7cf | 2008-10-22 11:49:14 +1030 | [diff] [blame] | 5 | if [ -z "$JAVAC" ] ; then |
Ying Wang | 1613f4f | 2010-09-22 14:11:49 -0700 | [diff] [blame] | 6 | exit 1 |
Rod Whitby | 3caa7cf | 2008-10-22 11:49:14 +1030 | [diff] [blame] | 7 | fi |
Raphael Moll | 4de32c6 | 2011-03-08 14:29:25 -0800 | [diff] [blame] | 8 | while [ -L "$JAVAC" ] ; do |
| 9 | LSLINE=$(ls -l "$JAVAC") |
| 10 | JAVAC=$(echo -n "$LSLINE" | sed -e "s/.* -> //") |
The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 11 | done |
| 12 | echo $JAVAC | sed -e "s:\(.*\)/bin/javac.*:\\1/lib/tools.jar:" |
| 13 | fi |