diff WarFoundry.sh @ 152:b612d7137f4d

Re #417: Improve WarFoundry installation experience * Initial attempt at a script that tries to do some validation and fix Ubuntu problems
author IBBoard <dev@ibboard.co.uk>
date Tue, 08 May 2012 21:00:24 +0100
parents 9a93ae9ad956
children c549fd4ff4bf
line diff
     1.1 --- a/WarFoundry.sh	Mon Nov 28 20:05:22 2011 +0000
     1.2 +++ b/WarFoundry.sh	Tue May 08 21:00:24 2012 +0100
     1.3 @@ -1,2 +1,19 @@
     1.4  #! /bin/bash
     1.5 -mono WarFoundry-GTK.exe $@
     1.6 +
     1.7 +command -v mono >/dev/null 2>&1
     1.8 +if [[ $? != 0 ]]; then
     1.9 +	##TODO Try using Zenity or similar, in case the user is running from a GUI and not seeing our output
    1.10 +	echo "WarFoundry requires Mono to run - please install it from your package manager" >&2
    1.11 +	exit 3
    1.12 +fi
    1.13 +
    1.14 +MONO_ARGS=''
    1.15 +
    1.16 +command -v lsb_release >/dev/null 2>&1
    1.17 +if [[ $? == 0 ]]; then
    1.18 +	if [[ `lsb_release -is` == "Ubuntu" && `lsb_release -rs` > 12 ]]; then
    1.19 +		MONO_ARGS=' --runtime=v4.0'
    1.20 +	fi
    1.21 +fi
    1.22 +
    1.23 +mono $MONO_ARGS WarFoundry-GTK.exe $@