# Fetching a link to get the latest version of MultiMC
echo "Retrieve the last package..."
latest=$(wget -qO- https://multimc.org/ | grep "Debian/Ubuntu") # retrieving for the official website
pat='href="(.*)" ' # regex
[[ $latest =~ $pat ]] # Use of REGEX
# Download the latest package
wget -q --show-progress -i ${BASH_REMATCH[1]} -O MultiMC.deb
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
echo -e "\nMultiMC installed! 🎉"