chiark / gitweb /
Leave a bit of headroom above test port number, since we go at least
[disorder] / scripts / dist
CommitLineData
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
20set -e
96b55624
RK
21web=$HOME/public_html/web/disorder
22
460b9539 23make
b56af10b 24make distcheck
460b9539 25make dist-bzip2
fef972ab 26v=$(make echo-version)
460b9539 27d=$(make echo-distdir)
96b55624
RK
28src=$d.tar.bz2
29
30# Report and execute a command remotely
31remote() {
32 local h=$1
33 shift
34 echo "$h:" "$@"
35 ssh $h "$@"
36}
37
38# Build .debs and copy to the right place
39build() {
40 local h=$1 # build host
41 local f=$2
fef972ab
RK
42 local vs=$3
43 local dist=$4
96b55624
RK
44
45 remote $h "mkdir -p _builds"
46 remote $h "rm -rf _builds/*.deb _builds/$d"
47 scp $src $h:_builds
48 remote $h "cd _builds && tar xfj $src"
fef972ab
RK
49 if [ "$vs" != "" ]; then
50 remote $h "cd _builds/$d && scripts/setversion $v~$vs 'Backport to $vs' $dist"
51 fi
96b55624
RK
52 remote $h "cd _builds/$d && fakeroot debian/rules binary"
53 mkdir -p $web/$f
54 scp $h:_builds/*.deb $web/$f/.
55}
56
57# Build various debs
58
59# Ubuntu dapper; binaries suit Debian etch too
fef972ab 60build dekabrach etch etch oldstable
96b55624
RK
61
62# Debian lenny (32-bit)
fef972ab 63build leucomorph lenny "" stable
96b55624
RK
64
65# Debian lenny (64-bit)
fef972ab 66build araminta lenny "" stable
96b55624
RK
67
68# Update the web
69cp $src $web
460b9539 70cd doc
71for f in *.[1-9].html; do
72 echo $f
96b55624
RK
73 rm -f $web/$f
74 sed < $f > $web/$f 's/^@.*//'
460b9539 75done
96b55624
RK
76cp plumbing.svg $web/.
77if [ -f plumbing.png ]; then
78 cp plumbing.png $web/.
79fi
80