| The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | #----------------------------------------------------------------------------| |
| 3 | # Creates the links to use ddm{ui}lib in the eclipse-ide plugin. |
| 4 | # Run this from device/tools/eclipse/scripts |
| 5 | #----------------------------------------------------------------------------| |
| 6 | |
| 7 | set -e |
| 8 | |
| 9 | HOST=`uname` |
| 10 | if [ "${HOST:0:6}" == "CYGWIN" ]; then |
| 11 | # We can't use symlinks under Cygwin |
| 12 | |
| 13 | function cpfile { # $1=dest $2=source |
| 14 | cp -fv $2 $1/ |
| 15 | } |
| 16 | |
| 17 | function cpdir() { # $1=dest $2=source |
| 18 | rsync -avW --delete-after $2 $1 |
| 19 | } |
| 20 | |
| 21 | else |
| 22 | # For all other systems which support symlinks |
| 23 | |
| 24 | # computes the "reverse" path, e.g. "a/b/c" => "../../.." |
| 25 | function back() { |
| 26 | echo $1 | sed 's@[^/]*@..@g' |
| 27 | } |
| 28 | |
| 29 | function cpfile { # $1=dest $2=source |
| 30 | ln -svf `back $1`/$2 $1/ |
| 31 | } |
| 32 | |
| 33 | function cpdir() { # $1=dest $2=source |
| 34 | ln -svf `back $1`/$2 $1 |
| 35 | } |
| 36 | fi |
| 37 | |
| 38 | # CD to the top android directory |
| 39 | D=`dirname "$0"` |
| 40 | cd "$D/../../../../" |
| 41 | |
| 42 | |
| 43 | BASE="development/tools/eclipse/plugins/com.android.ide.eclipse.ddms" |
| 44 | |
| 45 | DEST=$BASE/libs |
| 46 | mkdir -p $DEST |
| 47 | for i in prebuilt/common/jfreechart/*.jar; do |
| 48 | cpfile $DEST $i |
| 49 | done |
| 50 | |
| 51 | DEST=$BASE/src/com/android |
| 52 | mkdir -p $DEST |
| 53 | for i in development/tools/ddms/libs/ddmlib/src/com/android/ddmlib \ |
| 54 | development/tools/ddms/libs/ddmuilib/src/com/android/ddmuilib ; do |
| 55 | cpdir $DEST $i |
| 56 | done |
| 57 | |
| 58 | DEST=$BASE/icons |
| 59 | mkdir -p $DEST |
| 60 | for i in \ |
| 61 | add.png \ |
| 62 | backward.png \ |
| 63 | clear.png \ |
| 64 | d.png debug-attach.png debug-error.png debug-wait.png delete.png device.png down.png \ |
| 65 | e.png edit.png empty.png emulator.png \ |
| 66 | forward.png \ |
| 67 | gc.png \ |
| Xavier Ducrohet | 2143c56 | 2009-09-01 16:23:16 -0700 | [diff] [blame^] | 68 | heap.png halt.png hprof.png \ |
| The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 69 | i.png importBug.png \ |
| 70 | load.png \ |
| 71 | pause.png play.png pull.png push.png \ |
| 72 | save.png \ |
| 73 | thread.png \ |
| 74 | up.png \ |
| 75 | v.png \ |
| 76 | w.png warning.png ; do |
| 77 | cpfile $DEST development/tools/ddms/libs/ddmuilib/src/resources/images/$i |
| 78 | done |
| 79 | |