Files
dialog/check-version.sh
T

15 lines
298 B
Bash

#!/bin/bash
URL="https://invisible-island.net/archives/dialog/"
# Get version number from tag name
VERSION=$(curl -s -L "$URL" | grep -o -E 'dialog-[0-9].[0-9]-[0-9]{1,}.tgz' | uniq | tail -n1)
# Trim prefix
VERSION=${VERSION//dialog-/}
# Trim suffix
VERSION=${VERSION//.tgz/}
echo "$VERSION"