#!/bin/bash # Pagure repository REPO="libaio" # Get tag name using Pagure Rest API TAG_NAME=$(curl -s -L https://pagure.io/api/0/"$REPO"/git/tags | jq -r '.tags[]' | grep '^libaio-' | sort -V | tail -n1) # Trim prefix VERSION=${TAG_NAME//libaio-/} echo "$VERSION"