Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
diff WarFoundry.sh @ 154:c549fd4ff4bf
Re #417: Improve install process
* Add error messages with Zenity, in case user just double-clicks .sh file from Nautilus
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Thu, 10 May 2012 21:01:42 +0100 |
parents | b612d7137f4d |
children | b926b1b0ed79 |
line wrap: on
line diff
--- a/WarFoundry.sh Tue May 08 21:01:57 2012 +0100 +++ b/WarFoundry.sh Thu May 10 21:01:42 2012 +0100 @@ -1,9 +1,16 @@ #! /bin/bash -command -v mono >/dev/null 2>&1 +function reportError { + echo "ERROR: $1" >&2 + command -v zenity >/dev/null 2>&1 + if [[ $? == 0 ]]; then + zenity --error --text="$1" + fi +} + +command -v monoo >/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 + reportError "WarFoundry requires Mono to run - please install it from your package manager" exit 3 fi