Files
openldap/check-version.sh
T

12 lines
258 B
Bash

#!/bin/bash
URL="https://www.openldap.org/software/download/"
# Get version number from tag name
VERSION=$(curl -s -L "$URL" | grep -o -E 'OpenLDAP-[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}' | head -n1)
# Trim prefix
VERSION=${VERSION//OpenLDAP-/}
echo "$VERSION"