Files
help2man/check-version.sh
T
2025-09-16 20:48:43 +03:00

12 lines
325 B
Bash

#!/bin/bash
URL="ftp://ftp.gnu.org/gnu/help2man/"
# Get version number from FTP server
VERSION=$(curl -s --list-only "$URL" | grep -E '^help2man-[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"