blob: d81ae2dc25ea28cb5b34057375568ff9bcf62f85 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/sh
while [ "$1" ]; do
#set -- ${1%/}
unset curver port
[ -f $1/abuild ] && port=${1%/}
[ "$port" ] || { shift; continue; }
pname=${1##*/}
curver=$(grep ^version= $port/abuild | awk -F = '{print $2}')
[ "$curver" ] || { shift; continue; }
case $pname in
python-*) pname=python:${pname#python-};;
clang) pname=llvm;;
dejavu-fonts-ttf) pame=fonts:dejavu;;
lcms2) pname=lcms;;
esac
#echo $pname
v=$(curl -SsZA a https://repology.org/badge/latest-versions/$pname.svg | grep middle | sed 's/.*middle">//;s/<.*//;s/,//' | tr ' ' '\n' | tail -n1)
#if [ "$curver" = "$v" ]; then
#echo "$1: $curver (OK)"
#elif [ "$v" = "-" ]; then
#echo "$1: $curver (404)"
#else
#echo "$1: $curver > $v"
#fi
if [ "$curver" != "$v" ]; then
echo "$port $v ($curver)"
fi
#echo $1: ${v:-404}
shift
done
|