download from multimc.org instead of github
This commit is contained in:
parent
3182edfb4f
commit
f3cf209031
1 changed files with 6 additions and 6 deletions
|
@ -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
|
||||||
|
|
Reference in a new issue