Update package version to 1.4.21

This commit is contained in:
2026-06-09 21:38:26 +03:00
parent d363db245f
commit e5bce26211
4 changed files with 31 additions and 25 deletions
+6 -3
View File
@@ -1,8 +1,11 @@
#!/bin/bash
URL="https://www.gnu.org/software/m4/"
URL="ftp://ftp.gnu.org/gnu/m4/"
# Get version number from tag name
VERSION=$(curl -s -L "$URL" | grep 'The latest stable version is ' | grep -o -E '([0-9]*\.[0-9]*)\.[0-9]*')
# Get version number from FTP server
VERSION=$(curl -s --list-only "$URL" | grep -E '^m4-[0-9]{1,}\.[0-9]{1,}(\.[0-9]{1,})?.tar.xz$' | cut -d '-' -f2 | sort -V | tail -n1)
# Remove '.tar.gz' suffix from VERSION variable
VERSION=${VERSION//.tar.xz/}
echo "$VERSION"