This repository has been archived on 2022-03-25. You can view files and clone it, but cannot push or open issues or pull requests.
manjaroConfiguration/installMultiMC.sh

21 lines
666 B
Bash
Raw Normal View History

2022-02-15 09:26:55 +01:00
#!/usr/bin/env bash
2021-12-28 17:05:59 +01:00
# Fetching a link to get the latest version of MultiMC
2021-12-01 11:46:38 +01:00
echo "Retrieve the last package..."
2021-12-28 17:05:59 +01:00
latest=$(wget -qO- https://multimc.org/ | grep "Debian/Ubuntu") # retrieving for the official website
pat='href="(.*)" ' # regex
2021-12-28 17:05:59 +01:00
[[ $latest =~ $pat ]] # Use of REGEX
2021-12-01 11:46:38 +01:00
2021-12-28 17:05:59 +01:00
# Download the latest package
2022-02-15 09:26:55 +01:00
wget -q --show-progress -i "${BASH_REMATCH[1]}" -O MultiMC.deb
2021-12-01 11:46:38 +01:00
sudo apt install ./MultiMC.deb -y
rm MultiMC.deb
# We change the Ubuntu desktop shortcut from MultiMC to Minecraft
if [ -f /usr/share/applications/multimc.desktop ] ; then
sudo sed -i "7s#.*#Name=Minecraft#" /usr/share/applications/multimc.desktop
fi
2021-12-23 15:02:47 +01:00
echo -e "\nMultiMC installed! 🎉"