Commit | Line | Data |
---|---|---|
460b9539 | 1 | #! /bin/bash |
2 | # | |
3 | # This file is part of DisOrder | |
5aff007d | 4 | # Copyright (C) 2005-2008 Richard Kettlewell |
460b9539 | 5 | # |
e7eb3a27 | 6 | # This program is free software: you can redistribute it and/or modify |
460b9539 | 7 | # it under the terms of the GNU General Public License as published by |
e7eb3a27 | 8 | # the Free Software Foundation, either version 3 of the License, or |
460b9539 | 9 | # (at your option) any later version. |
e7eb3a27 RK |
10 | # |
11 | # This program is distributed in the hope that it will be useful, | |
12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | # GNU General Public License for more details. | |
15 | # | |
460b9539 | 16 | # You should have received a copy of the GNU General Public License |
e7eb3a27 | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
460b9539 | 18 | # |
19 | ||
20 | set -e | |
96b55624 RK |
21 | web=$HOME/public_html/web/disorder |
22 | ||
460b9539 | 23 | make |
b56af10b | 24 | make distcheck |
460b9539 | 25 | make dist-bzip2 |
26 | d=$(make echo-distdir) | |
96b55624 RK |
27 | src=$d.tar.bz2 |
28 | ||
29 | # Report and execute a command remotely | |
30 | remote() { | |
31 | local h=$1 | |
32 | shift | |
33 | echo "$h:" "$@" | |
34 | ssh $h "$@" | |
35 | } | |
36 | ||
37 | # Build .debs and copy to the right place | |
38 | build() { | |
39 | local h=$1 # build host | |
40 | local f=$2 | |
41 | ||
42 | remote $h "mkdir -p _builds" | |
43 | remote $h "rm -rf _builds/*.deb _builds/$d" | |
44 | scp $src $h:_builds | |
45 | remote $h "cd _builds && tar xfj $src" | |
46 | remote $h "cd _builds/$d && fakeroot debian/rules binary" | |
47 | mkdir -p $web/$f | |
48 | scp $h:_builds/*.deb $web/$f/. | |
49 | } | |
50 | ||
51 | # Build various debs | |
52 | ||
53 | # Ubuntu dapper; binaries suit Debian etch too | |
54 | build dekabrach etch | |
55 | ||
56 | # Debian lenny (32-bit) | |
57 | build leucomorph lenny | |
58 | ||
59 | # Debian lenny (64-bit) | |
60 | build araminta lenny | |
61 | ||
62 | # Update the web | |
63 | cp $src $web | |
460b9539 | 64 | cd doc |
65 | for f in *.[1-9].html; do | |
66 | echo $f | |
96b55624 RK |
67 | rm -f $web/$f |
68 | sed < $f > $web/$f 's/^@.*//' | |
460b9539 | 69 | done |
96b55624 RK |
70 | cp plumbing.svg $web/. |
71 | if [ -f plumbing.png ]; then | |
72 | cp plumbing.png $web/. | |
73 | fi | |
74 |