Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
annotate 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 |
rev | line source |
---|---|
112
9a93ae9ad956
* Add simple shell script to make sure that we run through Mono and not Wine (Not necessary, but useful to save confusion)
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
1 #! /bin/bash |
152
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
2 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
3 command -v mono >/dev/null 2>&1 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
4 if [[ $? != 0 ]]; then |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
5 ##TODO Try using Zenity or similar, in case the user is running from a GUI and not seeing our output |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
6 echo "WarFoundry requires Mono to run - please install it from your package manager" >&2 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
7 exit 3 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
8 fi |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
9 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
10 MONO_ARGS='' |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
11 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
12 command -v lsb_release >/dev/null 2>&1 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
13 if [[ $? == 0 ]]; then |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
14 if [[ `lsb_release -is` == "Ubuntu" && `lsb_release -rs` > 12 ]]; then |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
15 MONO_ARGS=' --runtime=v4.0' |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
16 fi |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
17 fi |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
18 |
b612d7137f4d
Re #417: Improve WarFoundry installation experience
IBBoard <dev@ibboard.co.uk>
parents:
112
diff
changeset
|
19 mono $MONO_ARGS WarFoundry-GTK.exe $@ |