diff options
author | Kenneth Endfinger | 2020-01-15 20:31:06 -0500 |
---|---|---|
committer | Kenneth Endfinger | 2020-01-15 20:31:06 -0500 |
commit | a6a5bab5b73095b5e3efdd067b6e42c4f6b1cb33 (patch) | |
tree | 7d741a6191be1f9042f7ed0fee22e73ee7434c97 /check-for-update.sh | |
parent | 2410b85ea1319ad0710b498b3143b103ade8f5ee (diff) | |
download | aur-a6a5bab5b73095b5e3efdd067b6e42c4f6b1cb33.tar.gz |
Take over maintainership.
Diffstat (limited to 'check-for-update.sh')
-rwxr-xr-x | check-for-update.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/check-for-update.sh b/check-for-update.sh new file mode 100755 index 000000000000..aeb1f638f17e --- /dev/null +++ b/check-for-update.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +set -e + +cd $(dirname "${0}") + +REPOSITORY="dbus-cxx/dbus-cxx" + +PKG=$(cat .SRCINFO | grep "pkgbase" | head -n1 | awk '{print $3}') +CURRENT=$(cat .SRCINFO | grep "pkgver" | head -n1 | awk '{print $3}') +LATEST=$(curl --silent -L "https://api.github.com/repos/${REPOSITORY}/tags" | jq -r '.[].name' | grep -v -- "-" | grep -v "^v" | grep "\." | head -n1) +if [ "${LATEST}" != "${CURRENT}" ] +then + echo "${PKG} : AUR ${CURRENT} != GitHub ${LATEST}" + exit 1 +fi +echo "${PKG} : AUR ${CURRENT} == GitHub ${LATEST}" +exit 0 |