#!/bin/bash # Check if the correct number of arguments is provided if [ $# -ne 2 ]; then echo "Usage: $0 " echo "Example: $0 Mpdf REL1_41" exit 1 fi # Extension name and version from arguments extension_name="$1" extension_version="$2" # URL to fetch url="https://www.mediawiki.org/wiki/Special:ExtensionDistributor?extdistname=${extension_name}&extdistversion=${extension_version}" # Fetch the HTML content using curl html=$(curl -s "$url") # Extract the download link using grep and sed download_link=$(echo "$html" | grep -oP '