From: Olivier Courtin <olivier.courtin@camptocamp.com>
Date: Tue, 23 Feb 2010 15:21:45 +0000 (+0000)
Subject: Check astyle version prior to do anything. 'blessed' version is 1.23. Related to... 
X-Git-Tag: 2.0.0alpha1~3194
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ce100f141dbaaeabf49c1f72dc2b58f1c5e52c48;p=postgis

Check astyle version prior to do anything. 'blessed' version is 1.23. Related to #433 and postgis-devel discussions

git-svn-id: http://svn.osgeo.org/postgis/trunk@5315 b70326c6-7e19-0410-871a-916f4a2858ee
---

diff --git a/astyle.sh b/astyle.sh
index 3ec0b5d31..1cc60f69a 100755
--- a/astyle.sh
+++ b/astyle.sh
@@ -10,6 +10,13 @@ if [ $RET -ne 0 ]; then
 	exit
 fi
 
+
+RET=`astyle --version 2>&1`
+if [ "$RET" != "Artistic Style Version 1.23" ]; then
+	echo "Only 1.23 astyle version is 'allowed'"
+	exit
+fi
+
 # Find all "pure" C files in the codebase
 #   - not .in.c used for .sql generation
 #   - not lex.yy.c or wktparse.tab.c as these are generated files