]>
Commit | Line | Data |
---|---|---|
87c0930c | 1 | #!/bin/bash |
e1a9d897 | 2 | for i in src/*/debian/RFS; do |
0558696d XL |
3 | echo "$(git log -1 --pretty="format:%ct" "$i")" "$i" |
4 | done | sort | while read t i; do | |
75ed87db | 5 | pkg=$(basename "$(dirname "$(dirname "$i")")") |
0b5e3ef0 | 6 | upstream_pkg=$(grep Upstream-Name src/$pkg/debian/copyright|awk '{print $2}') |
eedec011 SL |
7 | if test -z $upstream_pkg; then |
8 | echo "Could not find upstream package name. is src/$pkg/debian/copyright correct?" | |
9 | exit 2 | |
10 | fi | |
75ed87db | 11 | if test -n "$(git --no-pager branch --remotes -l origin/pending-"$pkg")"; then |
4b6bb6a3 SL |
12 | # If a pending branch exists, skip it |
13 | continue | |
14 | fi | |
fb45cf3d SL |
15 | AUTHOR=$(cat $(dirname "$i")/changelog|grep " -- "|head -1|sed -e "s| -- \(.*\) <.*$|\1|g") |
16 | ||
0b5e3ef0 SL |
17 | if test $pkg == $upstream_pkg; then |
18 | echo -e "$(date -d@"$t") \e[32m$pkg - $AUTHOR\e[0m" | |
19 | else | |
20 | echo -e "$(date -d@"$t") \e[32m$pkg (upstream name: $upstream_pkg) - $AUTHOR\e[0m" | |
21 | fi | |
dc938e6c | 22 | if ! head -1 $(dirname "$i")/changelog |grep -q UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; then |
aa275726 | 23 | echo -e "\e[31mRFS but the first line of the changelog doesn't contain UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO\e[0m" |
dc938e6c | 24 | fi |
b6003235 SL |
25 | if grep -q FIXME $(dirname "$i")/copyright; then |
26 | echo -e "\e[31mRFS but still contains FIXME in debian/copyright\e[0m" | |
27 | fi | |
de85ba7b SL |
28 | if test `grep urgency $(dirname "$i")/changelog|wc -l` -eq 1; then |
29 | # If there is only one item in the changelog, mark the package as NEW | |
30 | echo -e "\e[31mNEW package\e[0m" | |
55bdf692 SL |
31 | else |
32 | # It isn't NEW but I want to know if this is a new upstream release or not | |
33 | LAST_TWO=$(dpkg-parsechangelog -c 2 -l $(dirname "$i")/changelog|grep urgency) | |
734a4ec5 SL |
34 | LAST_FULL=$(echo "$LAST_TWO"|head -1|cut -d\( -f2|cut -d\) -f1) |
35 | SECOND_FULL=$(echo "$LAST_TWO"|tail -1|cut -d\( -f2|cut -d\) -f1) | |
36 | LAST=$(echo $LAST_FULL|cut -d- -f1) | |
37 | SECOND=$(echo $SECOND_FULL|cut -d- -f1) | |
55bdf692 | 38 | if test $LAST == $SECOND; then |
add165c8 SL |
39 | echo -e "\e[36mSame release ($SECOND_FULL => $LAST_FULL) \e[0m" |
40 | else | |
41 | echo -e "\e[33mNew upstream release ($SECOND_FULL => $LAST_FULL) \e[0m" | |
55bdf692 | 42 | fi |
de85ba7b | 43 | fi |
4b6bb6a3 | 44 | # trim the content |
e042a108 | 45 | content=$(xargs '-d\n' echo -n < "$i") |
4b6bb6a3 | 46 | if test -n "$content"; then |
39c24f9d | 47 | echo " $content" |
4b6bb6a3 | 48 | fi |
e1a9d897 | 49 | done |