2011-04-10 15:24:05 -07:00
|
|
|
#!/bin/bash
|
|
|
|
# command line build script for building release version
|
|
|
|
# This will only work on my (Jack Palevich) computer, because it
|
|
|
|
# requires the private key store used o sign the release version
|
|
|
|
# of Android Terminal Emulator.
|
2012-09-02 15:59:47 -07:00
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ -z "${ANDROID_NDK_ROOT+xxx}" ]; then
|
|
|
|
echo "Please define ANDROID_NDK_ROOT to point to the Android NDK"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "$ANDROID_NDK_ROOT" ]; then
|
|
|
|
echo "The directory $ANDROID_NDK_ROOT = ${ANDROID_NDK_ROOT} does not exist."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "${ANDROID_SDK_ROOT+xxx}" ]; then
|
|
|
|
echo "Please define ANDROID_SDK_ROOT to point to the Android SDK"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -d "$ANDROID_SDK_ROOT" ]; then
|
|
|
|
echo "The directory $ANDROID_SDK_ROOT = ${ANDROID_NDK_ROOT} does not exist."
|
|
|
|
exit 1
|
|
|
|
fi
|
2011-04-10 15:24:05 -07:00
|
|
|
|
2012-05-12 04:57:08 -07:00
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
ATE_ROOT="$( cd $DIR/.. && pwd )"
|
|
|
|
|
|
|
|
cd "$ATE_ROOT"
|
2012-09-02 15:59:47 -07:00
|
|
|
|
|
|
|
if [ ! -f "local.properties" ]; then
|
|
|
|
echo "local.properties does not exist. Please run tools/update.sh"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-09-09 11:47:38 -07:00
|
|
|
rm -rf `find . -name bin -o -name obj -prune`
|
2011-04-23 12:15:23 -07:00
|
|
|
cd jni
|
2012-05-06 10:48:50 -07:00
|
|
|
$ANDROID_NDK_ROOT/ndk-build && cd .. && ant release && mv bin/Term-release.apk bin/Term.apk
|