File: backport-ppa

package info (click to toggle)
postgresql-common 134wheezy4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 772 kB
  • sloc: perl: 2,345; sh: 437; makefile: 36
file content (35 lines) | stat: -rwxr-xr-x 1,099 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/sh
# Generate and upload backports for Ubuntu PPA
# Author: Martin Pitt <mpitt@debian.org>

set -e

if [ -n "`bzr modified`" ]; then
    echo "Modified files, aborting" >&2
    exit 1
fi

SRC=`dpkg-parsechangelog  | grep ^Source | cut -f2- -d' '`
if [ "$SRC" = postgresql-9.1 ]; then
    RELEASES='lucid natty'
elif [ "$SRC" = postgresql-9.2 ]; then
    RELEASES='lucid oneiric precise'
else
    RELEASES='lucid natty oneiric precise'
fi

CUR_VERSION=`dpkg-parsechangelog | grep ^Version | cut -f2 -d' '`
SINCE_VERSION=`dpkg-parsechangelog -n2 | grep urgency=| tail -n1 | awk '{print $2}' | tr -d '()'`


export DEBEMAIL=martin.pitt@ubuntu.com

for release in $RELEASES; do
    dch -D$release -v"$CUR_VERSION~${release}" -b 'Backport'
    if [ "$release" = lucid -o "$release" = "natty" -o "$release" = oneiric ]; then
        sed -i 's/dpkg-dev.*| hardening-wrapper/hardening-wrapper/' debian/control
    fi
    bzr bd -S -- -sd -v$SINCE_VERSION
    bzr revert --no-backup debian/changelog debian/control
    dput ppa:pitti/postgresql ../${SRC}_${CUR_VERSION}~${release}_source.changes
done