Files
glibc/check-version.sh
T
2025-08-15 17:12:28 +03:00

13 lines
344 B
Bash

#!/bin/bash
# Git repository
REPO="https://sourceware.org/git/glibc.git"
# Get tag name using 'git ls-remote'
TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | cut -d'/' -f3 | grep -w -E "glibc-([0-9]*\.[0-9]*)\$" | tail -n1)
# Trim 'glibc-' prefix from TAG_NAME
VERSION="${TAG_NAME//glibc-/}"
echo "$VERSION"