view 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 wrap: on
line source

#! /bin/bash

command -v mono >/dev/null 2>&1
if [[ $? != 0 ]]; then
	##TODO Try using Zenity or similar, in case the user is running from a GUI and not seeing our output
	echo "WarFoundry requires Mono to run - please install it from your package manager" >&2
	exit 3
fi

MONO_ARGS=''

command -v lsb_release >/dev/null 2>&1
if [[ $? == 0 ]]; then
	if [[ `lsb_release -is` == "Ubuntu" && `lsb_release -rs` > 12 ]]; then
		MONO_ARGS=' --runtime=v4.0'
	fi
fi

mono $MONO_ARGS WarFoundry-GTK.exe $@