Switch to stable branch of GnuPG

This commit is contained in:
2025-12-07 10:57:21 +02:00
parent 9a6cf2bf97
commit d9abd584f5
2 changed files with 5 additions and 9 deletions
+3 -7
View File
@@ -1,12 +1,8 @@
#!/bin/bash
# Git repository
REPO="git://git.gnupg.org/gnupg.git"
URL="https://gnupg.org/index.html"
# Get tag name using 'git ls-remote'
TAG_NAME=$(git ls-remote --exit-code --refs --tags --sort='v:refname' "$REPO" | cut -d'/' -f3 | grep -E '^gnupg-[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}' | tail -n1)
# Trim prefix
VERSION=${TAG_NAME//gnupg-/}
# Get version number from tag name
VERSION=$(curl -s -L "$URL" | grep 'The current version of GnuPG is ' | grep -o -E '[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}')
echo "$VERSION"