view WarFoundry.sh @ 167:9808adf2d566

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 b926b1b0ed79
children
line source
1 #! /bin/bash
3 function reportError {
4 echo "ERROR: $1" >&2
5 command -v zenity >/dev/null 2>&1
6 if [[ $? == 0 ]]; then
7 zenity --error --text="$1"
8 return
9 fi
11 command -v kdialog >/dev/null 2>&1
12 if [[ $? == 0 ]]; then
13 kdialog --error "$1"
14 fi
15 }
17 command -v mono >/dev/null 2>&1
18 if [[ $? != 0 ]]; then
19 reportError "WarFoundry requires Mono to run - please install it from your package manager"
20 exit 3
21 fi
23 MONO_ARGS=''
25 command -v lsb_release >/dev/null 2>&1
26 if [[ $? == 0 ]]; then
27 if [[ `lsb_release -is` == "Ubuntu" && `lsb_release -rs` > 12 ]]; then
28 MONO_ARGS=' --runtime=v4.0'
29 fi
30 fi
32 mono $MONO_ARGS WarFoundry-GTK.exe $@