summaryrefslogtreecommitdiff
path: root/manualPorts/gexiv2/lastVersion.sh
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-05-27 10:13:52 +0200
committerErich Eckner <git@eckner.net>2018-05-27 10:13:52 +0200
commit14a8f5d3c7889f2046a008b1b1dc29f485ebb359 (patch)
tree644ebb60f7155dd5c139d233857684fbcd8546e6 /manualPorts/gexiv2/lastVersion.sh
downloadcrux-ports-14a8f5d3c7889f2046a008b1b1dc29f485ebb359.tar.xz
initial commit
Diffstat (limited to 'manualPorts/gexiv2/lastVersion.sh')
-rwxr-xr-xmanualPorts/gexiv2/lastVersion.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/manualPorts/gexiv2/lastVersion.sh b/manualPorts/gexiv2/lastVersion.sh
new file mode 100755
index 0000000..bdbcd78
--- /dev/null
+++ b/manualPorts/gexiv2/lastVersion.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+for mainVer in $(
+ curl -Ss 'https://download.gnome.org/sources/gexiv2/' | \
+ tr '"' '\n' | \
+ grep '^[0-9.]\+/$' | \
+ sed 's|/$||' | \
+ sort -Vr
+)
+do
+ ver="$(
+ curl -Ss "https://download.gnome.org/sources/gexiv2/${mainVer}/" | \
+ tr '"' '\n' | \
+ grep '^gexiv2-[0-9.]\+\.tar\.xz$' | \
+ sed 's|^gexiv2-\([0-9.]\+\)\.tar\.xz$|\1|' | \
+ sort -V | \
+ tail -n1
+ )"
+ if [ -n "${ver}" ]
+ then
+ echo "${ver}"
+ break
+ fi
+done