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