From f3cf2090319224f587fd2a6550f3d9711964caef Mon Sep 17 00:00:00 2001 From: Mylloon Date: Thu, 23 Dec 2021 14:22:59 +0100 Subject: [PATCH] download from multimc.org instead of github --- installMultiMC.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/installMultiMC.sh b/installMultiMC.sh index 19b4383..2d43bc1 100644 --- a/installMultiMC.sh +++ b/installMultiMC.sh @@ -1,11 +1,11 @@ -# On récupère la dernière version de MultiMC -wget -q https://api.github.com/repos/MultiMC/Launcher/releases/latest +# On récupère le lien vers la dernière version de MultiMC 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 -rm latest +latest=$(wget -qO- https://multimc.org/ | grep "Debian/Ubuntu") # récupération depuis le site +pat='href="(.*)" ' # regex +[[ $latest =~ $pat ]] # utilisation du regex -wget -q --show-progress -i url -O MultiMC.deb -rm url +# 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