]> Pileus Git - aweather/blob - update_build.sh
Update GtkBuilder UI
[aweather] / update_build.sh
1 #!/bin/bash
2
3 #Grab command line arguments
4 OLDVERSION=$1
5 VERSION=$2
6
7 #Local
8 SRCSFOLDER=~/pkgbuild
9
10 #Remote
11 APTREPO=/aptrepo
12 USER=compuwizard123
13 HOST=compuwizard123.dyndns.org
14
15 #build using 2 threads
16 BUILD="debuild -j2 -uc -us"
17
18 #look for new libgis version
19 APP=libgis
20 cd $SRCSFOLDER/$APP/
21 uscan --download-version $VERSION
22 cd $SRCSFOLDER/$APP/${APP}-$OLDVERSION/
23 uupdate -v $VERSION ../${APP}-$VERSION.tar.gz
24 cd $SRCSFOLDER/$APP/${APP}-$VERSION/
25 cp $SRCSFOLDER/$APP/${APP}-$OLDVERSION/debian/watch debian/
26
27 #build libgis and libgis-dev
28 $BUILD
29 dchroot -d "linux32 $BUILD -ai386"
30
31 #copy libgis and libgis-dev to remote repo
32 scp ../${APP}_$VERSION-0ubuntu1.diff.gz ../${APP}_$VERSION-0ubuntu1.dsc ../${APP}_$VERSION.orig.tar.gz $USER@$HOST:$APTREPO/source/
33 scp ../${APP}_$VERSION-0ubuntu1_amd64.deb ../${APP}-dev_$VERSION-0ubuntu1_amd64.deb ../${APP}_$VERSION-0ubuntu1_i386.deb ../${APP}-dev_$VERSION-0ubuntu1_i386.deb $USER@$HOST:$APTREPO/binary/
34
35 #install updated libgis and libgis-dev before building aweather
36 sudo dpkg --install ../${APP}_$VERSION-0ubuntu1_amd64.deb
37 sudo dpkg --install ../$APP-dev_$VERSION-0ubuntu1_amd64.deb
38 dchroot -d "linux32 sudo dpkg --install ../${APP}_$VERSION-0ubuntu1_i386.deb"
39 dchroot -d "linux32 sudo dpkg --install ../$APP-dev_$VERSION-0ubuntu1_i386.deb"
40
41 #look for new aweather version
42 APP=aweather
43 cd $SRCSFOLDER/$APP/
44 uscan --download-version $VERSION
45 cd $SRCSFOLDER/$APP/${APP}-$OLDVERSION/
46 uupdate -v $VERSION ../$APP-$VERSION.tar.gz
47 cd $SRCSFOLDER/$APP/$APP-$VERSION/
48 cp $SRCSFOLDER/$APP/${APP}-$OLDVERSION/debian/watch debian/
49
50 #build aweather
51 $BUILD
52 dchroot -d "linux32 $BUILD -ai386"
53
54 #copy aweather to remote repo
55 scp ../${APP}_$VERSION-0ubuntu1.diff.gz ../${APP}_$VERSION-0ubuntu1.dsc ../${APP}_$VERSION.orig.tar.gz $USER@$HOST:$APTREPO/source/
56 scp ../${APP}_$VERSION-0ubuntu1_amd64.deb ../${APP}_$VERSION-0ubuntu1_i386.deb $USER@$HOST:$APTREPO/binary/
57
58 #update remote repo
59 ssh $USER@$HOST '~/pkgbuild/aptrepo.sh'