summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMort Yao2016-03-13 15:12:03 +0100
committerMort Yao2016-03-13 15:15:32 +0100
commitae3b014439e430ba574f588f21a8a46584330eae (patch)
tree010ce32124b9b03dab3f1210cbd348abb1962b89
parentcadaa576b2d3a30125ff6eb476c07f34692783ed (diff)
downloadaur-ae3b014439e430ba574f588f21a8a46584330eae.tar.gz
add check4u (a tool to check for updates)
-rwxr-xr-xcheck4u21
1 files changed, 21 insertions, 0 deletions
diff --git a/check4u b/check4u
new file mode 100755
index 000000000000..895b3807821f
--- /dev/null
+++ b/check4u
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+# ./check4u -- check for updates of a software package
+
+fstar_latest() {
+ local GITHUB_RELEASES='https://github.com/FStarLang/FStar/releases.atom'
+
+ LATEST=`sed -e "s/xmlns/ignore/" <(curl --silent $GITHUB_RELEASES) |
+ xmllint --xpath "/feed/entry[1]/title/text()" - | cut -d' ' -f1`
+}
+fstar_current() {
+ source PKGBUILD &&
+ CURRENT="v$pkgver"
+}
+
+fstar_latest && fstar_current
+
+if [[ "$LATEST" != "$CURRENT" ]]; then
+ echo -e "Latest release : $LATEST"
+ echo -e "Currently on AUR : $CURRENT"
+ exit 1
+fi