rfs list: check if this is a new version or not
Sylvestre Ledru
1 year, 8 months ago
27 | 27 | if test `grep urgency $(dirname "$i")/changelog|wc -l` -eq 1; then |
28 | 28 | # If there is only one item in the changelog, mark the package as NEW |
29 | 29 | echo -e "\e[31mNEW package\e[0m" |
30 | else | |
31 | # It isn't NEW but I want to know if this is a new upstream release or not | |
32 | LAST_TWO=$(dpkg-parsechangelog -c 2 -l $(dirname "$i")/changelog|grep urgency) | |
33 | LAST=$(echo "$LAST_TWO"|head -1|cut -d\( -f2|cut -d\) -f1|cut -d- -f1) | |
34 | SECOND=$(echo "$LAST_TWO"|tail -1|cut -d\( -f2|cut -d\) -f1|cut -d- -f1) | |
35 | if test $LAST == $SECOND; then | |
36 | echo -e "\e[31mNot a new release\e[0m" | |
37 | fi | |
30 | 38 | fi |
31 | 39 | # trim the content |
32 | 40 | content=$(xargs '-d\n' echo -n < "$i") |