1 #!/bin/bash 2 # Expected arguments: 3 # $1 = out_dir 4 # $2 = ide qualifier 5 # $3 = zip qualifier 6 7 if [[ "Linux" != $(uname) ]]; then 8 echo "$0: ADT IDE build script runs only on Linux" 9 exit 0 10 fi 11 12 PROG_DIR=$(dirname "$0") 13 14 DEST_DIR="$1" 15 IDE_QUALIFIER="$2" 16 ZIP_QUALIFIER="$3" 17 18 function die() { 19 echo "$*" > /dev/stderr 20 echo "Usage: $0 dest_dir ide_qualifier zip_qualifier" > /dev/stderr 21 exit 1 22 } 23 24 if [[ -z "$DEST_DIR" ]]; then die "## Error: Missing dest_dir"; fi 25 if [[ -z "$IDE_QUALIFIER" ]]; then die "## Error: Missing ide qualifier"; fi 26 if [[ -z "$ZIP_QUALIFIER" ]]; then die "## Error: Missing zip qualifier"; fi 27 28 ADT_IDE_DEST_DIR="$DEST_DIR" \ 29 ADT_IDE_QUALIFIER="$IDE_QUALIFIER" \ 30 ADT_IDE_ZIP_QUALIFIER="$ZIP_QUALIFIER" \ 31 make PRODUCT-sdk-adt_eclipse_ide 32 33