autodist-upstream-updates: add support to fetch updates from repology API (repology.org)

This commit is contained in:
2021-03-14 11:55:11 +01:00
parent 9d003905df
commit b6d3b83d1e
3 changed files with 49 additions and 8 deletions

View File

@@ -76,7 +76,7 @@ function version_compare()
return 2
fi
else
if [[ "$A" > "$B" ]]; then
if [[ ${1} =~ ^[0-9]+$ || "$A" > "$B" ]]; then
return 1
elif [[ "$A" < "$B" ]]; then
return 2
@@ -276,17 +276,18 @@ parse_distromatic() {
}
if [ ! "$skip_parsing" ]; then
tmpfile=`mktemp -q -t autodist-upstream-updates.XXXXXXXX`
#tmpfile=`mktemp -q -t autodist-upstream-updates.XXXXXXXX`
buildstmp=`mktemp -q -t autodist-upstream-updates.XXXXXXXX`
tail -n+2 $BUILDS_FILE > $buildstmp
parse_arch_linux
parse_xorg
parse_gnome
parse_distromatic
#parse_arch_linux
#parse_xorg
#parse_gnome
#parse_distromatic
/usr/share/autodist/repology-openmamba.py > $UPDATES_DB.tmp
cat $tmpfile | sort -uf > $UPDATES_DB.tmp
rm -f $tmpfile
#cat $tmpfile | sort -uf > $UPDATES_DB.tmp
#rm -f $tmpfile
> $UPDATES_DB
unset lastpkg