view WarFoundry.sh @ 167:9808adf2d566 default tip

Re #419: Remove assumptions of a file-based install * Update GTK# GUI to use Streams version of XSLT export
author IBBoard <dev@ibboard.co.uk>
date Wed, 28 Nov 2012 20:25:53 +0000
parents 4149dbdf042f
children
line wrap: on
line source

#! /bin/bash

function reportError {
	echo "ERROR: $1" >&2
	command -v zenity >/dev/null 2>&1
	if [[ $? == 0 ]]; then
		zenity --error --text="$1"
		return
	fi

	command -v kdialog >/dev/null 2>&1
	if [[ $? == 0 ]]; then
		kdialog --error "$1"
	fi
}

command -v mono >/dev/null 2>&1
if [[ $? != 0 ]]; then
	reportError "WarFoundry requires Mono to run - please install it from your package manager"
	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 $@