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