~popey/+junk/phablet-flash-wrapper

« back to all changes in this revision

Viewing changes to tbbr.sh

  • Committer: Alan Pope
  • Date: 2013-09-04 11:08:11 UTC
  • Revision ID: alan.pope@canonical.com-20130904110811-kip6h6b25yylr7qw
Add script to test a branch directly on device

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
#
 
3
# tbbr.sh - Branch, Build, Run
 
4
#
 
5
# Script to grab any branch for a core app build and shove to device
 
6
# Expects one parameter which is the branch. e.g.
 
7
#
 
8
# ./tbbr.sh lp:~rpadovani/ubuntu-calculator-app/1217876
 
9
 
 
10
BRANCH=$1
 
11
BUILDLOCATION=$(mktemp -d)
 
12
HERE=$(pwd)
 
13
 
 
14
cd $BUILDLOCATION
 
15
echo `date` Branch $BRANCH 
 
16
bzr branch -q $BRANCH 2>&1 > $BUILDLOCATION/bzr.log
 
17
cd * 
 
18
echo `date` Build $BRANCH in `pwd`
 
19
debuild -uc -us 2>&1 > $BUILDLOCATION/build.log
 
20
 
 
21
adb shell mkdir $BUILDLOCATION
 
22
 
 
23
DEB=`ls $BUILDLOCATION/*.deb | grep -v autopilot`
 
24
echo `date` Send $DEB to device
 
25
adb push $DEB $BUILDLOCATION 2>&1 > $BUILDLOCATION/push.log
 
26
echo `date` Install $DEB
 
27
adb shell dpkg -i $DEB
 
28
 
 
29
cd $HERE
 
30
 
 
31
echo `date` Rebooting device
 
32
adb reboot
 
33
 
 
34
echo `date` Temp files in $BUILDLOCATION can now be deleted