aboutsummaryrefslogtreecommitdiff
path: root/repos/outdated.sh
diff options
context:
space:
mode:
Diffstat (limited to 'repos/outdated.sh')
-rwxr-xr-xrepos/outdated.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/repos/outdated.sh b/repos/outdated.sh
new file mode 100755
index 00000000..e316a1d9
--- /dev/null
+++ b/repos/outdated.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+while [ "$1" ]; do
+ #set -- ${1%/}
+ unset curver port
+ [ -f $1/info ] && port=${1%/}
+ [ "$port" ] || { shift; continue; }
+ pname=${1##*/}
+ curver=$(grep ^version= $port/info | 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