349
by Colin Watson
add ubuntu-changes, copied from ~lp_archive/bin/ on cocoplum and tweaked to use rmadison |
1 |
#! /bin/sh
|
2 |
||
355
by Colin Watson
Apply GPLv3 to anything not already licensed; ok slangasek, broder, laney, kitterman, geser |
3 |
# Copyright (C) 2009, 2010, 2011, 2012 Canonical Ltd.
|
4 |
||
5 |
# This program is free software: you can redistribute it and/or modify
|
|
6 |
# it under the terms of the GNU General Public License as published by
|
|
7 |
# the Free Software Foundation; version 3 of the License.
|
|
8 |
#
|
|
9 |
# This program is distributed in the hope that it will be useful,
|
|
10 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
# GNU General Public License for more details.
|
|
13 |
#
|
|
14 |
# You should have received a copy of the GNU General Public License
|
|
15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16 |
||
1396
by Łukasz 'sil2100' Zemczak
s/groovy/hirsute |
17 |
DIST="${DIST:-hirsute}" |
349
by Colin Watson
add ubuntu-changes, copied from ~lp_archive/bin/ on cocoplum and tweaked to use rmadison |
18 |
|
19 |
MADISON="$(rmadison -a source -s "$DIST" "$1")" |
|
20 |
[ "$MADISON" ] || exit 1 |
|
21 |
||
22 |
VER="$(echo "$MADISON" | cut -d'|' -f2 | tr -d ' ' | sed -r 's/^[0-9]+://')" |
|
23 |
SECTION="$(echo "$MADISON" | cut -d'|' -f3 | tr -d ' ')" |
|
24 |
case $SECTION in |
|
25 |
$DIST) |
|
26 |
SECTION=main |
|
27 |
;;
|
|
28 |
$DIST/*) |
|
29 |
SECTION="${SECTION#$DIST/}" |
|
30 |
;;
|
|
31 |
esac
|
|
32 |
case $1 in |
|
33 |
lib?*)
|
|
34 |
POOLINDEX="$(echo "$1" | cut -c 1-4)" |
|
35 |
;;
|
|
36 |
*)
|
|
37 |
POOLINDEX="$(echo "$1" | cut -c 1)" |
|
38 |
;;
|
|
39 |
esac
|
|
40 |
||
41 |
NL=' |
|
42 |
'
|
|
43 |
OLDIFS="$IFS" |
|
44 |
IFS="$NL" |
|
705
by Colin Watson
ubuntu-changes: don't interpret backslashes in changelogs |
45 |
wget -q -O- http://changelogs.ubuntu.com/changelogs/pool/$SECTION/$POOLINDEX/$1/${1}_$VER/changelog | while read -r line; do |
349
by Colin Watson
add ubuntu-changes, copied from ~lp_archive/bin/ on cocoplum and tweaked to use rmadison |
46 |
IFS="$OLDIFS" |
47 |
case $line in |
|
48 |
[A-Za-z0-9]*) |
|
49 |
# changelog entry header
|
|
50 |
target="$(echo "$line" | cut -d' ' -f3)" |
|
51 |
target="${target%;}" |
|
52 |
target="${target%%-*}" |
|
53 |
case $target in |
|
1396
by Łukasz 'sil2100' Zemczak
s/groovy/hirsute |
54 |
warty|hoary|breezy|dapper|edgy|feisty|gutsy|hardy|intrepid|jaunty|karmic|lucid|maverick|natty|oneiric|precise|quantal|raring|saucy|trusty|utopic|vivid|wily|xenial|yakkety|zesty|artful|bionic|cosmic|disco|eoan|focal|groovy|hirsute|devel) |
349
by Colin Watson
add ubuntu-changes, copied from ~lp_archive/bin/ on cocoplum and tweaked to use rmadison |
55 |
;;
|
56 |
*)
|
|
57 |
exit 0 |
|
58 |
;;
|
|
59 |
esac
|
|
60 |
;;
|
|
61 |
esac
|
|
62 |
echo "$line" |
|
63 |
IFS="$NL" |
|
64 |
done
|
|
65 |
IFS="$OLDIFS" |