GH-1096 make ubuntu package work on both 32bit and 64bit machines
This commit is contained in:
parent
d403d12d6a
commit
bbba63eca5
@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
INSTDIR=~/MultiMC
|
||||
|
||||
deploy() {
|
||||
mkdir -p $INSTDIR
|
||||
cd ${INSTDIR}
|
||||
|
||||
wget --progress=dot:force "http://files.multimc.org/downloads/mmc-stable-lin64.tar.gz" 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 mmc-stable-lin64.tar.gz --strip-components=2
|
||||
rm mmc-stable-lin64.tar.gz
|
||||
chmod +x MultiMC
|
||||
./MultiMC
|
||||
}
|
||||
|
||||
runmmc() {
|
||||
cd ${INSTDIR}
|
||||
./MultiMC
|
||||
}
|
||||
|
||||
if [[ ! -f ${INSTDIR}/MultiMC ]]; then
|
||||
deploy
|
||||
else
|
||||
runmmc
|
||||
fi
|
@ -1,6 +1,6 @@
|
||||
Package: multimc
|
||||
Version: 1.0.1
|
||||
Architecture: amd64
|
||||
Version: 1.1-1
|
||||
Architecture: all
|
||||
Maintainer: Petr Mrázek <peterix@gmail.com>
|
||||
Section: games
|
||||
Priority: optional
|
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
32
application/package/ubuntu/multimc_1.1-1/opt/multimc/run.sh
Executable file
32
application/package/ubuntu/multimc_1.1-1/opt/multimc/run.sh
Executable file
@ -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
|
12
application/package/ubuntu/readme.md
Normal file
12
application/package/ubuntu/readme.md
Normal file
@ -0,0 +1,12 @@
|
||||
# What is this?
|
||||
A simple ubuntu package for MultiMC that wraps the contains a script that downloads and installs real MultiMC on ubuntu based systems.
|
||||
|
||||
It contains a `.dekstop` file, an icon, and a simple script that does the heavy lifting.
|
||||
|
||||
# How to build this?
|
||||
You need dpkg utils and then run:
|
||||
```
|
||||
fakeroot dpkg-deb --build multimc_1.1-1
|
||||
```
|
||||
|
||||
Replace the version with whatever is appropriate.
|
Loading…
Reference in New Issue
Block a user