1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/bash
#
# bbr.sh - Branch, Build, Run
#
# Script to grab trunk for all core apps build and shove to device
# Expects a file in current directory called coreapps.txt
# which is just a list of all the core apps
BUILDLOCATION=$(mktemp -d)
COREAPPSLIST='coreapps.txt'
HERE=$(pwd)
for app in $(cat coreapps.txt)
do
cd $BUILDLOCATION
echo `date` Branch $app
bzr branch -q lp:$app 2>&1 > $BUILDLOCATION/bzr_$app.log
cd $app
echo `date` Build $app
debuild -uc -us 2>&1 > $BUILDLOCATION/build_$app.log
done
adb shell mkdir $BUILDLOCATION
for deb in $(ls $BUILDLOCATION/*.deb | grep -v autopilot)
do
echo `date` Send $deb to device
adb push $deb $BUILDLOCATION 2>&1 > $BUILDLOCATION/push_$app.log
echo `date` Install $deb
adb shell dpkg -i $deb
done
cd $HERE
echo `date` Rebooting device
adb reboot
echo `date` Temp files in $BUILDLOCATION can now be deleted
|