summaryrefslogtreecommitdiff
path: root/manualPorts
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2020-06-18 23:50:52 +0200
committerErich Eckner <git@eckner.net>2020-06-18 23:50:52 +0200
commit620c5444e8008a569574a8528e6e61fa58aca4d6 (patch)
tree4fe54e64559c676d87ef1338b4ab4946fd159913 /manualPorts
parentd118e16ac877b741f7e95043a4b362d3c4ae281d (diff)
downloadcrux-ports-620c5444e8008a569574a8528e6e61fa58aca4d6.tar.xz
fpc: lastVersion.sh neu
Diffstat (limited to 'manualPorts')
-rwxr-xr-xmanualPorts/fpc/lastVersion.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/manualPorts/fpc/lastVersion.sh b/manualPorts/fpc/lastVersion.sh
new file mode 100755
index 0000000..1bc4a95
--- /dev/null
+++ b/manualPorts/fpc/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$//
+ '