blob: 5a002c3457529457fb03a5e9e27721086c5aa498 [file] [log] [blame]
Pierre Zurek81f09882010-12-20 02:31:37 +01001#!/bin/bash
2function die() {
3 echo "Error: $*"
4 exit 1
5}
6
7set -e # fail early
8
9# CD to the top android directory
10D=`dirname "$0"`
11cd "$D/../../../"
12
13DEST="sdk/eclipse/plugins/com.android.ide.eclipse.traceview/libs"
14# computes "../.." from DEST to here (in /android)
15BACK=`echo $DEST | sed 's@[^/]*@..@g'`
16
17mkdir -p $DEST
18
19LIBS="traceview"
20
21echo "make java libs ..."
22make -j3 showcommands $LIBS || die "TRACEVIEW: Fail to build one of $LIBS."
23
24echo "Copying java libs to $DEST"
25
26
27HOST=`uname`
28if [ "$HOST" == "Linux" ]; then
29 for LIB in $LIBS; do
30 ln -svf $BACK/out/host/linux-x86/framework/$LIB.jar "$DEST/"
31 done
32
33elif [ "$HOST" == "Darwin" ]; then
34 for LIB in $LIBS; do
35 ln -svf $BACK/out/host/darwin-x86/framework/$LIB.jar "$DEST/"
36 done
37
38elif [ "${HOST:0:6}" == "CYGWIN" ]; then
39 for LIB in $LIBS; do
40 cp -vf out/host/windows-x86/framework/$LIB.jar "$DEST/"
41 done
42
43 chmod -v a+rx "$DEST"/*.jar
44else
45 echo "Unsupported platform ($HOST). Nothing done."
46fi
47