summaryrefslogtreecommitdiff
path: root/uselessPorts/gimp/lastVersion.sh
diff options
context:
space:
mode:
Diffstat (limited to 'uselessPorts/gimp/lastVersion.sh')
-rwxr-xr-xuselessPorts/gimp/lastVersion.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/uselessPorts/gimp/lastVersion.sh b/uselessPorts/gimp/lastVersion.sh
new file mode 100755
index 0000000..3d1a0ed
--- /dev/null
+++ b/uselessPorts/gimp/lastVersion.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+latestVersion="$(\
+ curl "https://download.gimp.org/pub/gimp/" 2> /dev/null | \
+ tr "\"/" "\n\n" | \
+ grep "^v[[:digit:]]\+\.[[:digit:]]\+\$" | \
+ sed "s/^v//" | \
+ sort -V | \
+ tail -n1)"
+
+curl "https://download.gimp.org/pub/gimp/v${latestVersion}/" 2> /dev/null | \
+ tr "\"/" "\n\n" | \
+ grep "^gimp-\([[:digit:]]\+\(\.[[:digit:]]\+\)*\)\.tar\.bz2\$" | \
+ sed "s/^gimp-\([[:digit:]]\+\(\.[[:digit:]]\+\)*\)\.tar\.bz2\$/\1/" | \
+ sort -V | \
+ tail -n1