summaryrefslogtreecommitdiff
path: root/manualPorts/gexiv2/lastVersion.sh
diff options
context:
space:
mode:
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