[tracker] autogen.sh: Error gracefully when valac is not installed



commit 7b608c332397d339b0af8bb0ccd5fa8f034079b4
Author: Sam Thursfield <sam thursfield codethink co uk>
Date:   Thu Mar 8 16:25:04 2012 +0000

    autogen.sh: Error gracefully when valac is not installed

 autogen.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index fa75978..e8d18fa 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -28,6 +28,13 @@ compare_versions() {
 # Vala version check
 test -z "$VALAC" && VALAC=valac
 VALA_VERSION=`$VALAC --version | cut -d" " -f2`
+
+if [ -z "$VALA_VERSION" ]; then
+    echo "**Error**: valac not installed or broken. You must have valac >= $REQUIRED_VALA_VERSION"
+    echo "installed to build."
+    exit 1
+fi
+
 echo "Found Vala $VALA_VERSION"
 
 if ! compare_versions $REQUIRED_VALA_VERSION $VALA_VERSION; then



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]