Files
cdparanoia/check-version.sh
T
2026-07-31 13:16:58 +03:00

15 lines
310 B
Bash

#!/bin/bash
URL="ftp://ftp.osuosl.org/pub/xiph/releases/cdparanoia/"
# Get version number from FTP server
VERSION=$(curl -s --list-only "$URL" | grep -o -P 'cdparanoia-III-[\d.]+.src' | tail -n1)
# Remove prefix
VERSION=${VERSION//cdparanoia-III-}
# Remove suffix
VERSION=${VERSION//.src}
echo "$VERSION"