diff options
author | Mort Yao | 2016-03-13 15:09:29 +0100 |
---|---|---|
committer | Mort Yao | 2016-03-13 15:14:33 +0100 |
commit | 14aa4f5aae69557e6f915a45e430388c835495c8 (patch) | |
tree | ecd1ffacb968526974dabc3a8d81bcfef5e1d580 | |
parent | e0427c65bbd8eed266ee5af44df50683ae56d2de (diff) | |
download | aur-14aa4f5aae69557e6f915a45e430388c835495c8.tar.gz |
add check4u (a tool to check for updates)
-rwxr-xr-x | check4u | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/check4u b/check4u new file mode 100755 index 000000000000..c4ce22279c39 --- /dev/null +++ b/check4u @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# ./check4u -- check for updates of a software package + +fsharp_latest() { + local GITHUB_RELEASES='https://github.com/fsharp/fsharp/releases.atom' + + LATEST=`sed -e "s/xmlns/ignore/" <(curl --silent $GITHUB_RELEASES) | + xmllint --xpath "/feed/entry[1]/title/text()" -` +} +fsharp_current() { + source PKGBUILD && + CURRENT="$pkgver" +} + +fsharp_latest && fsharp_current + +if [[ "$LATEST" != "$CURRENT" ]]; then + echo -e "Latest release : $LATEST" + echo -e "Currently on AUR : $CURRENT" + exit 1 +fi |