summaryrefslogtreecommitdiff
path: root/manualPorts/hugin/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/hugin/lastVersion.sh
downloadcrux-ports-14a8f5d3c7889f2046a008b1b1dc29f485ebb359.tar.xz
initial commit
Diffstat (limited to 'manualPorts/hugin/lastVersion.sh')
-rwxr-xr-xmanualPorts/hugin/lastVersion.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/manualPorts/hugin/lastVersion.sh b/manualPorts/hugin/lastVersion.sh
new file mode 100755
index 0000000..842f838
--- /dev/null
+++ b/manualPorts/hugin/lastVersion.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+for s in $(
+ curl "https://sourceforge.net/projects/hugin/files/hugin/" 2> /dev/null | \
+ tr '"' '\n' | \
+ grep "^/projects/hugin/files/hugin/.*/\$"
+)
+do
+ inhalt="$(
+ curl "https://sourceforge.net${s}" 2> /dev/null | \
+ tr '"' '\n' | \
+ grep "^https://sourceforge.net${s}hugin-[0-9.-]*\.tar\.bz2/download\$" | \
+ sed "s|^https://sourceforge.net${s}hugin-\([0-9.-]*\)\.tar\.bz2/download\$|\1|" | \
+ head -n1
+ )"
+ if [ -n "${inhalt}" ]
+ then
+ if [[ "${inhalt}" = *.*.* ]]; then
+ echo "${inhalt}"
+ else
+ echo "${inhalt}.0"
+ fi
+ break
+ fi
+done