~popey/+junk/phablet-flash-wrapper

« back to all changes in this revision

Viewing changes to bbr.sh

  • Committer: Alan Pope
  • Date: 2013-09-03 20:52:54 UTC
  • Revision ID: alan.pope@canonical.com-20130903205254-b75cbl16n0oaz2a3
Add bbr tool to branch,build,push

Show diffs side-by-side

added added

removed removed

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