Debian Codegraph @

etc/ppa-upload.sh

raw symbols SCIP
1 #!/bin/sh
2 #
3 # fstrcmp - fuzzy string compare library
4 # Copyright (C) 2012 Peter Miller
5 # Written by Peter Miller <[email protected]>
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 3 of the License, or (at
10 # your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License along
18 # with this program. If not, see <http://www.gnu.org/licenses/>.
19 #
20 set -e
21
22 project=fstrcmp
23 wwwdir=web-site
24
25 AEGIS_PROJECT=${project}.cur
26 export AEGIS_PROJECT
27
28 RELEASES="$@"
29 test -z "$RELEASES" && RELEASES="lucid precise"
30
31 PPA=ppa:pmiller-opensource/ppa
32
33 #find the project baseline
34 bl=`aegis -cd -bl`
35 dir=$bl/$wwwdir
36 f=`( cd $dir && ls *.tar.gz ) | tail -1`
37 if [ -z "$f" ]
38 then
39 echo "can't find tarball" 1>&2
40 exit 1
41 fi
42 tgz=$dir/$f
43
44 tdir=/tmp/${project}-ppa-$$
45
46 for release in $RELEASES
47 do
48 cd /tmp
49 rm -rf $tdir
50 mkdir $tdir
51 cd $tdir
52 tar xzf $tgz
53 cd ${project}-*
54
55 PACKAGE=`head -1 debian/changelog | awk '{print $1}'`
56 VERSION=`head -1 debian/changelog | awk '{print $2}' |
57 sed -r -e 's/^\(//;s/\)$//'`
58
59 sed -i -r -e "1s/\) [^;]+; /~pm~${release}) ${release}; /" debian/changelog
60 head -1 debian/changelog
61 dpkg-buildpackage -S -sa
62 ls -lho ..
63 dput $PPA ../${PACKAGE}_${VERSION}~pm~${release}_source.changes
64
65 cd /tmp
66 rm -rf $tdir
67 done
68 exit 0
69 # vim: set ts=8 sw=4 et :