view WarFoundry.sh @ 166:ef94bed818e1

* Swap to non-specific versions of GTK libraries to help us build on the server
author IBBoard <dev@ibboard.co.uk>
date Mon, 08 Oct 2012 19:27:56 +0100
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 $@