diff options
author | Konstantin Lopyrev <klopyrev@google.com> | 2010-07-15 18:26:51 -0700 |
---|---|---|
committer | Konstantin Lopyrev <klopyrev@google.com> | 2010-07-16 17:06:26 -0700 |
commit | 0f317518ceb4687a14b97c813682b78654033aa8 (patch) | |
tree | f948974d47d176512216dc676e3be5f73cbac482 /eclipse/scripts | |
parent | 00c8ee85c0e04e4b7c46cdbc88dca7c2dd613430 (diff) | |
download | sdk-0f317518ceb4687a14b97c813682b78654033aa8.zip sdk-0f317518ceb4687a14b97c813682b78654033aa8.tar.gz sdk-0f317518ceb4687a14b97c813682b78654033aa8.tar.bz2 |
First commit... Ignore *.java files, they are there just so it builds.
Change-Id: Ibf159c32cee7a770f1c36f387fe646d9ecabe168
Diffstat (limited to 'eclipse/scripts')
-rwxr-xr-x | eclipse/scripts/create_all_symlinks.sh | 2 | ||||
-rwxr-xr-x | eclipse/scripts/create_hierarchyviewer_symlinks.sh | 69 |
2 files changed, 71 insertions, 0 deletions
diff --git a/eclipse/scripts/create_all_symlinks.sh b/eclipse/scripts/create_all_symlinks.sh index acda10f..99b81df 100755 --- a/eclipse/scripts/create_all_symlinks.sh +++ b/eclipse/scripts/create_all_symlinks.sh @@ -23,5 +23,7 @@ echo ; echo "### TEST ###" ; echo $DEST/create_test_symlinks.sh "$*" echo ; echo "### BRIDGE ###" ; echo $DEST/create_bridge_symlinks.sh "$*" +echo ; echo "### HIERARCHYVIEWER ###" ; echo +$DEST/create_hierarchyviewer_symlinks.sh "$*" echo "### $0 done" diff --git a/eclipse/scripts/create_hierarchyviewer_symlinks.sh b/eclipse/scripts/create_hierarchyviewer_symlinks.sh new file mode 100755 index 0000000..ce7bf4b --- /dev/null +++ b/eclipse/scripts/create_hierarchyviewer_symlinks.sh @@ -0,0 +1,69 @@ +#!/bin/bash +#----------------------------------------------------------------------------| +# Creates the links to use hierarchyviewer{ui}lib in the eclipse-ide plugin. +# Run this from sdk/eclipse/scripts +#----------------------------------------------------------------------------| + +set -e + +function die() { + echo "Error: $*" + exit 1 +} + +HOST=`uname` + +if [ "${HOST:0:6}" == "CYGWIN" ]; then + PLATFORM="windows-x86" + + # We can't use symlinks under Cygwin + + function cpfile { # $1=dest $2=source + cp -fv $2 $1/ + } + + function cpdir() { # $1=dest $2=source + rsync -avW --delete-after $2 $1 + } + +else + if [ "$HOST" == "Linux" ]; then + PLATFORM="linux-x86" + elif [ "$HOST" == "Darwin" ]; then + PLATFORM="darwin-x86" + else + echo "Unsupported platform ($HOST). Nothing done." + fi + + # For all other systems which support symlinks + + # computes the "reverse" path, e.g. "a/b/c" => "../../.." + function back() { + echo $1 | sed 's@[^/]*@..@g' + } + + function cpfile { # $1=dest $2=source + ln -svf `back $1`/$2 $1/ + } + + function cpdir() { # $1=dest $2=source + ln -svf `back $1`/$2 $1 + } +fi + +# CD to the top android directory +D=`dirname "$0"` +cd "$D/../../../" + +BASE="sdk/eclipse/plugins/com.android.ide.eclipse.hierarchyviewer" +DEST=$BASE/libs + +mkdir -p $DEST + +LIBS="hierarchyviewerlib hierarchyvieweruilib" +echo "make java libs ..." +make -j3 showcommands $LIBS || die "Hierarchy Viewer: Fail to build one of $LIBS." + +for LIB in $LIBS; do + cpfile $DEST out/host/$PLATFORM/framework/$LIB.jar +done
\ No newline at end of file |