download from multimc.org instead of github

This commit is contained in:
Mylloon 2021-12-23 14:22:59 +01:00
parent 3182edfb4f
commit f3cf209031
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -1,11 +1,11 @@
# On récupère la dernière version de MultiMC # On récupère le lien vers la dernière version de MultiMC
wget -q https://api.github.com/repos/MultiMC/Launcher/releases/latest
echo "Retrieve the last package..." echo "Retrieve the last package..."
grep 'browser_download_url": ".*.deb"' latest | awk '{ print substr ($0, 32 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }' > url latest=$(wget -qO- https://multimc.org/ | grep "Debian/Ubuntu") # récupération depuis le site
rm latest pat='href="(.*)" ' # regex
[[ $latest =~ $pat ]] # utilisation du regex
wget -q --show-progress -i url -O MultiMC.deb # On télécharge le paquet
rm url wget -q --show-progress -i ${BASH_REMATCH[1]} -O MultiMC.deb
sudo apt install ./MultiMC.deb -y sudo apt install ./MultiMC.deb -y
rm MultiMC.deb rm MultiMC.deb