diff options
author | Petr Mrázek <peterix@gmail.com> | 2015-06-28 22:44:53 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2015-06-28 22:44:53 +0200 |
commit | bbba63eca5a0161a1b5b3bccb7af2070abc629db (patch) | |
tree | 75178c19c45eaf45ff12e81f3c2c884f3d3a5454 /application/package/ubuntu/multimc_1.1-1/opt/multimc/run.sh | |
parent | d403d12d6abfd9c89c2aaedc6e18b39fd608d798 (diff) | |
download | MultiMC-bbba63eca5a0161a1b5b3bccb7af2070abc629db.tar MultiMC-bbba63eca5a0161a1b5b3bccb7af2070abc629db.tar.gz MultiMC-bbba63eca5a0161a1b5b3bccb7af2070abc629db.tar.lz MultiMC-bbba63eca5a0161a1b5b3bccb7af2070abc629db.tar.xz MultiMC-bbba63eca5a0161a1b5b3bccb7af2070abc629db.zip |
GH-1096 make ubuntu package work on both 32bit and 64bit machines
Diffstat (limited to 'application/package/ubuntu/multimc_1.1-1/opt/multimc/run.sh')
-rwxr-xr-x | application/package/ubuntu/multimc_1.1-1/opt/multimc/run.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/application/package/ubuntu/multimc_1.1-1/opt/multimc/run.sh b/application/package/ubuntu/multimc_1.1-1/opt/multimc/run.sh new file mode 100755 index 00000000..7a215abd --- /dev/null +++ b/application/package/ubuntu/multimc_1.1-1/opt/multimc/run.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +INSTDIR=~/.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 "http://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 + ./MultiMC +} + +runmmc() { + cd ${INSTDIR} + ./MultiMC +} + +if [[ ! -f ${INSTDIR}/MultiMC ]]; then + deploy +else + runmmc +fi |