autodist-upstream-updates: try to detect and remove unstable releases in parse_gnome()

This commit is contained in:
Silvan Calarco 2014-07-27 13:49:10 +02:00
parent 55224a3ecb
commit 52f9b3e9e0

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# autodist upstream updates - find upstream packages updates from different internet resources
# Copyright (c) 2004-2013 by Silvan Calarco <silvan.calarco@mambasoft.it>
# Copyright (c) 2004-2014 by Silvan Calarco <silvan.calarco@mambasoft.it>
#
#[ -r /etc/sysconfig/openmamba-central ] || {
@ -231,7 +231,16 @@ parse_gnome() {
ver="$3"
alias=`grep "^$pkg " $ALIASES_DB`
[ "$alias" ] || alias=`grep "^lib$pkg " $ALIASES_DB`
[ "$pkg" -a "$ver" ] && echo "$pkg $ver $SOURCEURL ${alias/* /}" >> $tmpfile
if [ "$pkg" -a "$ver" ]; then
ver1=$(echo $ver | cut -d. -f1)
ver2=$(echo $ver | cut -d. -f2)
if [ $ver1 -ge 2 -a $ver1 -le 4 -a "$ver2" -a $(($ver2 % 2)) -ne 0 ]; then
# skip unstable 2.x and 3.x versions with odd numbers
continue
else
echo "$pkg $ver $SOURCEURL ${alias/* /}" >> $tmpfile
fi
fi
fi
done
done