diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2014-02-07 18:33:04 +0000 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2014-02-12 09:54:40 +0000 |
commit | 1f5a90f28443886ebefcfbd531b8e41ece298cca (patch) | |
tree | 55aa67a2549526ed14d51092663be0fd9803ba19 /tools/art | |
parent | a52214230ad091359956ed7566670963aedf2045 (diff) | |
download | art-1f5a90f28443886ebefcfbd531b8e41ece298cca.tar.gz art-1f5a90f28443886ebefcfbd531b8e41ece298cca.tar.bz2 art-1f5a90f28443886ebefcfbd531b8e41ece298cca.zip |
Add a script for running art standalone.
Change-Id: I0c48856d811c40662a6e4a4782478a0bc8e0f697
Diffstat (limited to 'tools/art')
-rwxr-xr-x | tools/art | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -34,8 +34,22 @@ while true; do done unset ANDROID_PRODUCT_OUT # avoid defaulting dex2oat --host-prefix to target output + +function follow_links() { + file="$1" + while [ -h "$file" ]; do + # On Mac OS, readlink -f doesn't work. + file="$(readlink "$file")" + done + echo "$file" +} + +PROG_NAME="$(follow_links "$BASH_SOURCE")" +PROG_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" +ANDROID_BUILD_TOP="$(cd "${PROG_DIR}/../../../../" ; pwd -P)/" +ANDROID_HOST_OUT=$PROG_DIR/.. + mkdir -p /tmp/android-data/dalvik-cache -cd $ANDROID_BUILD_TOP ANDROID_DATA=/tmp/android-data \ ANDROID_ROOT=$ANDROID_HOST_OUT \ LD_LIBRARY_PATH=$ANDROID_HOST_OUT/lib \ |