2015-06-28 20:44:53 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-09-28 21:28:40 +00:00
|
|
|
INSTDIR=$XDG_DATA_HOME/multimc
|
2015-06-28 20:44:53 +00:00
|
|
|
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}
|
|
|
|
|
2015-09-28 21:28:40 +00:00
|
|
|
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..."
|
2015-06-28 20:44:53 +00:00
|
|
|
|
|
|
|
tar -xzf ${PACKAGE} --transform='s,MultiMC/,,'
|
|
|
|
rm ${PACKAGE}
|
|
|
|
chmod +x MultiMC
|
|
|
|
}
|
|
|
|
|
|
|
|
runmmc() {
|
|
|
|
cd ${INSTDIR}
|
|
|
|
./MultiMC
|
|
|
|
}
|
|
|
|
|
|
|
|
if [[ ! -f ${INSTDIR}/MultiMC ]]; then
|
|
|
|
deploy
|
2015-09-28 21:28:40 +00:00
|
|
|
runmmc
|
2015-06-28 20:44:53 +00:00
|
|
|
else
|
|
|
|
runmmc
|
|
|
|
fi
|