From bbba63eca5a0161a1b5b3bccb7af2070abc629db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Sun, 28 Jun 2015 22:44:53 +0200 Subject: GH-1096 make ubuntu package work on both 32bit and 64bit machines --- .../ubuntu/multimc_1.1-1/opt/multimc/icon.svg | 1993 ++++++++++++++++++++ .../ubuntu/multimc_1.1-1/opt/multimc/run.sh | 32 + 2 files changed, 2025 insertions(+) create mode 100644 application/package/ubuntu/multimc_1.1-1/opt/multimc/icon.svg create mode 100755 application/package/ubuntu/multimc_1.1-1/opt/multimc/run.sh (limited to 'application/package/ubuntu/multimc_1.1-1/opt/multimc') diff --git a/application/package/ubuntu/multimc_1.1-1/opt/multimc/icon.svg b/application/package/ubuntu/multimc_1.1-1/opt/multimc/icon.svg new file mode 100644 index 00000000..178509ac --- /dev/null +++ b/application/package/ubuntu/multimc_1.1-1/opt/multimc/icon.svg @@ -0,0 +1,1993 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 -- cgit v1.2.3