Switch to stable branch of GnuPG
This commit is contained in:
+3
-7
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user