]> git.proxmox.com Git - debcargo-conf.git/commitdiff
rfs list: check if this is a new version or not
authorSylvestre Ledru <sylvestre@debian.org>
Sat, 27 Aug 2022 12:51:48 +0000 (14:51 +0200)
committerSylvestre Ledru <sylvestre@debian.org>
Sat, 27 Aug 2022 12:51:48 +0000 (14:51 +0200)
dev/list-rfs.sh

index fe3817c674df47df34e30896b27d5ffc1645c5f5..e47ee101fcaa017658b0869ba3a6b23dd544ec7f 100755 (executable)
@@ -28,6 +28,14 @@ done | sort  | while read t i; do
     if test `grep urgency $(dirname "$i")/changelog|wc -l` -eq 1; then
         # If there is only one item in the changelog, mark the package as NEW
         echo -e "\e[31mNEW package\e[0m"
+    else
+        # It isn't NEW but I want to know if this is a new upstream release or not
+        LAST_TWO=$(dpkg-parsechangelog -c 2 -l $(dirname "$i")/changelog|grep urgency)
+        LAST=$(echo "$LAST_TWO"|head -1|cut -d\( -f2|cut -d\) -f1|cut -d- -f1)
+        SECOND=$(echo "$LAST_TWO"|tail -1|cut -d\( -f2|cut -d\) -f1|cut -d- -f1)
+        if test $LAST == $SECOND; then
+            echo -e "\e[31mNot a new release\e[0m"
+        fi
     fi
     # trim the content
     content=$(xargs '-d\n' echo -n < "$i")