diff options
author | Raphael Moll <ralf@android.com> | 2013-03-19 20:36:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2013-03-19 20:36:03 +0000 |
commit | 1f1c499db555c5388f91447d48f24d3b19249dc2 (patch) | |
tree | 6854ea425904a6a9d5771dd261ae132301e0e443 /eclipse/scripts | |
parent | 3191924bf5b4b23ce91e16bf067add263f6e2e88 (diff) | |
parent | 524af41e448441f023ecde76b35de15a497c2ad6 (diff) | |
download | sdk-1f1c499db555c5388f91447d48f24d3b19249dc2.zip sdk-1f1c499db555c5388f91447d48f24d3b19249dc2.tar.gz sdk-1f1c499db555c5388f91447d48f24d3b19249dc2.tar.bz2 |
Merge "Build IDE script."
Diffstat (limited to 'eclipse/scripts')
-rwxr-xr-x | eclipse/scripts/build_ide.sh | 27 | ||||
-rwxr-xr-x | eclipse/scripts/build_server.sh | 19 |
2 files changed, 41 insertions, 5 deletions
diff --git a/eclipse/scripts/build_ide.sh b/eclipse/scripts/build_ide.sh new file mode 100755 index 0000000..0b080d8 --- /dev/null +++ b/eclipse/scripts/build_ide.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# Expected arguments: +# $1 = out_dir +# $2 = ide qualifier +# $3 = zip qualifier + +PROG_DIR=$(dirname "$0") + +DEST_DIR="$1" +IDE_QUALIFIER="$2" +ZIP_QUALIFIER="$3" + +function die() { + echo "$*" > /dev/stderr + echo "Usage: $0 dest_dir ide_qualifier zip_qualifier" > /dev/stderr + exit 1 +} + +if [[ -z "$DEST_DIR" ]]; then die "## Error: Missing dest_dir"; fi +if [[ -z "$IDE_QUALIFIER" ]]; then die "## Error: Missing ide qualifier"; fi +if [[ -z "$ZIP_QUALIFIER" ]]; then die "## Error: Missing zip qualifier"; fi + +ADT_IDE_DEST_DIR="$DEST_DIR" \ +ADT_IDE_QUALIFIER="$IDE_QUALIFIER" \ +ADT_IDE_ZIP_QUALIFIER="$ZIP_QUALIFIER" \ + make PRODUCT-sdk-adt_eclipse_ide + diff --git a/eclipse/scripts/build_server.sh b/eclipse/scripts/build_server.sh index bfb50a2..da7184a 100755 --- a/eclipse/scripts/build_server.sh +++ b/eclipse/scripts/build_server.sh @@ -18,6 +18,8 @@ set -e # Fail this script as soon as a command fails -- fail early, fail fast +PROG_DIR=$(dirname "$0") + DEST_DIR="" BUILD_NUMBER="" CREATE_ZIP="1" @@ -48,7 +50,7 @@ function die() { function check_params() { # This needs to run from the top android directory # Automatically CD to the top android directory, whatever its name - D=`dirname "$0"` + D="$PROG_DIR" cd "$D/../../../" && echo "Switched to directory $PWD" # The current Eclipse build has some Linux dependency in its config files @@ -112,10 +114,17 @@ function build_adt_ide() { # Build the ADT IDE if this runs on Linux. # Qualifier for the zip files is just the build number if available. if [[ -z $INTERNAL_BUILD && "Linux" == $(uname) ]]; then - ADT_IDE_DEST_DIR="$DEST_DIR" \ - ADT_IDE_QUALIFIER="$QUALIFIER" \ - ADT_IDE_ZIP_QUALIFIER="${BUILD_NUMBER:-$QUALIFIER}" \ - make PRODUCT-sdk-adt_eclipse_ide + # This needs to run from the top android directory + D="$PROG_DIR" + cd "$D/../../../" && echo "Switched to directory $PWD" + for sc in */*/*/build_ide*.sh; do + if [[ -x $sc ]]; then + echo "RUNNING $sc from $PWD" + $sc "$DEST_DIR" "$QUALIFIER" "${BUILD_NUMBER:-$QUALIFIER}" + else + echo "WARNING: skipping non-exec $sc script" + fi + done fi } |