diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-10-21 07:00:00 -0700 |
commit | b6c1cf6de79035f58b512f4400db458c8401379a (patch) | |
tree | 68979db37c85b499bc384e4ac337ed1424baab51 /core/find-jdk-tools-jar.sh | |
download | build-b6c1cf6de79035f58b512f4400db458c8401379a.tar.gz build-b6c1cf6de79035f58b512f4400db458c8401379a.tar.bz2 build-b6c1cf6de79035f58b512f4400db458c8401379a.zip |
Initial Contribution
Diffstat (limited to 'core/find-jdk-tools-jar.sh')
-rwxr-xr-x | core/find-jdk-tools-jar.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/find-jdk-tools-jar.sh b/core/find-jdk-tools-jar.sh new file mode 100755 index 000000000..091eae467 --- /dev/null +++ b/core/find-jdk-tools-jar.sh @@ -0,0 +1,10 @@ +if [[ "x$ANDROID_JAVA_HOME" != x && -e $ANDROID_JAVA_HOME/lib/tools.jar ]] ; then + echo $ANDROID_JAVA_HOME/lib/tools.jar +else + JAVAC=$(which javac) + 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 |