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
|
||||
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
|
||||
|
|
Reference in a new issue