15 lines
315 B
Bash
15 lines
315 B
Bash
#!/bin/bash
|
|
|
|
URL="https://sourceforge.net/projects/cdrtools/files/alpha"
|
|
|
|
# Get version number from tag name
|
|
VERSION=$(curl -s -L "$URL" | grep -o -P 'cdrtools-(\d+\.\d+[ab]\d+)\.tar\.gz' | sort -V | tail -n1)
|
|
|
|
# Trim prefix
|
|
VERSION=${VERSION//cdrtools-}
|
|
|
|
# Trim suffix
|
|
VERSION=${VERSION//.tar.gz}
|
|
|
|
echo "$VERSION"
|