PrismLauncher/application/package/ubuntu/multimc/opt/multimc/run.sh
Petr Mrázek b9fd381eee GH-2268 update the deb package to not depend on latest jre
* `openjdk-8-jre` is now recommended
* the package now depends on `desktop-file-utils`
* the desktop icon has been updated to the current one
2018-05-17 23:14:12 +02:00

34 lines
714 B
Bash
Executable File

#!/bin/bash
INSTDIR="${XDG_DATA_HOME-$HOME/.local/share}/multimc"
if [ `getconf LONG_BIT` = "64" ]
then
PACKAGE="mmc-stable-lin64.tar.gz"
else
PACKAGE="mmc-stable-lin32.tar.gz"
fi
deploy() {
mkdir -p $INSTDIR
cd ${INSTDIR}
wget --progress=dot:force "https://files.multimc.org/downloads/${PACKAGE}" 2>&1 | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloading at \2\/s, ETA \3/' | zenity --progress --auto-close --auto-kill --title="Downloading MultiMC..."
tar -xzf ${PACKAGE} --transform='s,MultiMC/,,'
rm ${PACKAGE}
chmod +x MultiMC
}
runmmc() {
cd ${INSTDIR}
./MultiMC
}
if [[ ! -f ${INSTDIR}/MultiMC ]]; then
deploy
runmmc
else
runmmc
fi