# On récupère le lien vers la dernière version de MultiMC echo "Retrieve the last package..." latest=$(wget -qO- https://multimc.org/ | grep "Debian/Ubuntu") # récupération depuis le site pat='href="(.*)" ' # regex [[ $latest =~ $pat ]] # utilisation du regex # On télécharge le paquet wget -q --show-progress -i ${BASH_REMATCH[1]} -O MultiMC.deb sudo apt install ./MultiMC.deb -y rm MultiMC.deb echo "" echo "MultiMC installed!"