diff options
author | Raphael Moll <ralf@android.com> | 2013-03-15 15:59:34 -0700 |
---|---|---|
committer | Raphael Moll <ralf@android.com> | 2013-03-15 16:00:12 -0700 |
commit | 524af41e448441f023ecde76b35de15a497c2ad6 (patch) | |
tree | cd7da961434088e3c7fc7ba46d0e96c16fad15ec /eclipse/scripts | |
parent | a45f523a1354d8845f9d9914135817b8a37cfa60 (diff) | |
download | sdk-524af41e448441f023ecde76b35de15a497c2ad6.zip sdk-524af41e448441f023ecde76b35de15a497c2ad6.tar.gz sdk-524af41e448441f023ecde76b35de15a497c2ad6.tar.bz2 |
Build IDE script.
Change-Id: I99e6ae5ac952fe2f1295fd80a222373540a1cab2
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 } |