summaryrefslogtreecommitdiff
path: root/manualPorts/fpc-cross
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-01-21 21:55:01 +0100
committerErich Eckner <git@eckner.net>2019-01-21 21:55:01 +0100
commit5da6e7afb6137bc74bda83073dd5f8264f8c6e68 (patch)
treed3854581c522e784d2d42da9e50f2d948e007d2b /manualPorts/fpc-cross
parentce6aa3ae61a72efbe02a97b692739893e42aa5a5 (diff)
downloadcrux-ports-5da6e7afb6137bc74bda83073dd5f8264f8c6e68.tar.xz
cleanup
Diffstat (limited to 'manualPorts/fpc-cross')
-rwxr-xr-xmanualPorts/fpc-cross/lastVersion.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/manualPorts/fpc-cross/lastVersion.sh b/manualPorts/fpc-cross/lastVersion.sh
new file mode 100755
index 0000000..1bc4a95
--- /dev/null
+++ b/manualPorts/fpc-cross/lastVersion.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+curl -Ss 'ftp://ftp.freepascal.org/pub/fpc/dist/' | \
+ awk '{print $9}' | \
+ grep -x '[0-9.]\+' | \
+ sort -Vr | \
+ while read -r ver; do
+ curl -Ss "ftp://ftp.freepascal.org/pub/fpc/dist/${ver}/source/" | \
+ awk '{print $9}' | \
+ grep -m1 -xF "fpcbuild-${ver}.tar.gz" && \
+ break
+ done | \
+ sed '
+ s/^fpcbuild-//
+ s/\.tar\.gz$//
+ '