]> granicus.if.org Git - postgis/commitdiff
Fix astyle.sh script so that if astyle cannot be found then it immediately aborts...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Thu, 28 Jan 2010 14:23:35 +0000 (14:23 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Thu, 28 Jan 2010 14:23:35 +0000 (14:23 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5173 b70326c6-7e19-0410-871a-916f4a2858ee

astyle.sh

index 96357a4cc28e91e98111bfe844c9e6f5691f0ca6..9396688268c4a190c62b520117b3c5a739a39f5a 100755 (executable)
--- a/astyle.sh
+++ b/astyle.sh
@@ -2,6 +2,14 @@
 
 # Run astyle on the code base ready for release
 
+# If astyle doesn't exist, exit the script and do nothing
+echo "FOO" | astyle > /dev/null
+RET=$?
+if [ $RET -ne 0 ]; then
+       echo "Could not find astyle - aborting." 
+       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