2011-11-12 06:31:18 +08:00
|
|
|
#!/bin/sh
|
2009-01-30 18:17:23 +08:00
|
|
|
if [ "x$ANDROID_JAVA_HOME" != x ] && [ -e "$ANDROID_JAVA_HOME/lib/tools.jar" ] ; then
|
2008-10-21 22:00:00 +08:00
|
|
|
echo $ANDROID_JAVA_HOME/lib/tools.jar
|
|
|
|
else
|
|
|
|
JAVAC=$(which javac)
|
2008-10-22 09:19:14 +08:00
|
|
|
if [ -z "$JAVAC" ] ; then
|
2010-09-23 05:11:49 +08:00
|
|
|
exit 1
|
2008-10-22 09:19:14 +08:00
|
|
|
fi
|
2011-03-09 06:29:25 +08:00
|
|
|
while [ -L "$JAVAC" ] ; do
|
|
|
|
LSLINE=$(ls -l "$JAVAC")
|
|
|
|
JAVAC=$(echo -n "$LSLINE" | sed -e "s/.* -> //")
|
2008-10-21 22:00:00 +08:00
|
|
|
done
|
|
|
|
echo $JAVAC | sed -e "s:\(.*\)/bin/javac.*:\\1/lib/tools.jar:"
|
|
|
|
fi
|