aboutsummaryrefslogtreecommitdiffstats
path: root/eclipse/scripts
diff options
context:
space:
mode:
authorRaphael Moll <ralf@android.com>2010-11-23 01:18:20 -0800
committerRaphael Moll <ralf@android.com>2010-11-23 01:18:20 -0800
commitb3719207a81bca92ec53982e3d474a2299e7cda6 (patch)
tree33bd8ff9d780a792a9fab421b2fb6f6d8ab6ecda /eclipse/scripts
parent476a6e18ba87159b34fabb8a0bd73abb804c5079 (diff)
downloadsdk-b3719207a81bca92ec53982e3d474a2299e7cda6.zip
sdk-b3719207a81bca92ec53982e3d474a2299e7cda6.tar.gz
sdk-b3719207a81bca92ec53982e3d474a2299e7cda6.tar.bz2
Fix URL for eclipse download (for auto build plugin)
Change-Id: I1eba4b240869a222a0eb1c8676cd120acfb0fba4
Diffstat (limited to 'eclipse/scripts')
-rwxr-xr-xeclipse/scripts/setup_eclipse.sh24
1 files changed, 16 insertions, 8 deletions
diff --git a/eclipse/scripts/setup_eclipse.sh b/eclipse/scripts/setup_eclipse.sh
index 8ce1013..8dbf04e 100755
--- a/eclipse/scripts/setup_eclipse.sh
+++ b/eclipse/scripts/setup_eclipse.sh
@@ -12,7 +12,7 @@
#-----------------
#
-# Note: right now this is invoked by //device/tools/eclipse/doBuild.sh
+# Note: right now this is invoked by sdk/eclipse/doBuild.sh
# and it *MUST* be invoked with the following destination directory:
#
# $ setup_eclipse.sh /buildbot/eclipse-android/3.4.0/
@@ -27,33 +27,40 @@ function die() {
exit 1
}
-if [ "-p" == "$1" ]; then
+V="--no-verbose"
+if [[ "$1" == "-v" ]]; then
+ V=""
+ shift
+fi
+
+if [[ "-p" == "$1" ]]; then
GET_PID="-p"
shift
fi
+
BASE_DIR="$1"
-[ -n "$1" ] || die "Usage: $0 <dest-dir>"
+[[ -n "$1" ]] || die "Usage: $0 <dest-dir>"
# URL for 3.4.0 RCP Linux 32 Bits. Includes GEF, WTP as needed.
-DOWNLOAD_URL="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/SR2/eclipse-rcp-ganymede-SR2-linux-gtk.tar.gz&url=http://eclipse.unixheads.org/technology/epp/downloads/release/ganymede/SR2/eclipse-rcp-ganymede-SR2-linux-gtk.tar.gz&mirror_id=480"
+DOWNLOAD_URL="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/SR2/eclipse-rcp-ganymede-SR2-linux-gtk.tar.gz"
BIN="$BASE_DIR/eclipse/eclipse" # path to installed binary
TARGZ="$BASE_DIR/eclipse-rcp-ganymede-linux-gtk.tar.gz"
-if [ ! -f "$BIN" ]; then
+if [[ ! -f "$BIN" ]]; then
echo "Downloading and installing Eclipse in $BASE_DIR."
mkdir -p "$BASE_DIR"
- wget --continue --no-verbose --output-document="$TARGZ" "$DOWNLOAD_URL"
+ wget --continue $V --output-document="$TARGZ" "$DOWNLOAD_URL"
echo "Unpacking $TARGZ"
(cd "$BASE_DIR" && tar xzf "$TARGZ")
-
+
echo
echo "*** WARNING: To setup Eclipse correctly, it must be ran at least once manually"
echo "*** Eclipse will now start."
echo
- if [ -n "$GET_PID" ]; then
+ if [[ -n "$GET_PID" ]]; then
# if started from the automatic eclipse build, run Eclipse in the background
"$BIN" &
ECLIPSE_PID=$!
@@ -65,3 +72,4 @@ if [ ! -f "$BIN" ]; then
"$BIN"
fi
fi
+