0
0
mirror of https://github.com/thunderbird/thunderbird-android.git synced 2024-09-20 04:02:14 +02:00
thunderbird-android/tools/debian_build.sh
Bob Mottram 05f4002a2a
Build script for Debian
Add a script which builds the project on Debian
and produces an apk. This makes creating test builds
a little easier
2015-06-19 12:13:55 +01:00

52 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# This script is intended to be used on Debian systems for building
# the project. It has been tested with Debian 8
USERNAME=$USER
SIGNING_NAME='k-9'
cd ..
PROJECT_HOME=$(pwd)
sudo apt-get install build-essential default-jdk android-tools-adb \
lib32stdc++6 lib32z1 lib32z1-dev gradle
if [ ! -d ~/Android ]; then
echo -n 'Download android studio from http://developer.android.com/sdk/'
echo -n 'index.html and extract it to the the home folder, install, open'
echo -n 'the Sdk Manager and install Android 17 and Sdk tools for 19.1, '
echo 'then press any key...'
read -n 1 -s
cd ~/Android/Sdk/tools
echo ''
echo ''
echo -n 'You need to have pretty much everything installed. '
echo 'It will take some time.'
./android sdk
cd $PROJECT_HOME
fi
echo "sdk.dir=/home/$USERNAME/Android/Sdk" > local.properties
# install Gradle (if is not installed yet) and then execute Gradle
./gradlew build
#cd ~/develop/$PROJECT_NAME/build/outputs/apk
#keytool -genkey -v -keystore example.keystore -alias \
# "$SIGNING_NAME" -keyalg RSA -keysize 4096
#jarsigner -verbose -keystore example.keystore \
# k9mail-release-unsigned.apk "$SIGNING_NAME"
# cleaning up
cd $PROJECT_HOME/k9mail/build/outputs/apk
if [ ! -f k9mail-release-unsigned.apk ]; then
echo 'k9mail-release-unsigned.apk was not found'
exit 648
fi
echo 'Build script ended successfully'
echo -n 'apk is available at: '
echo "$PROJECT_HOME/k9mail/build/outputs/apk/k9mail-release-unsigned.apk"
exit 0