From: Mark Cave-Ayland Date: Thu, 28 Jan 2010 14:23:35 +0000 (+0000) Subject: Fix astyle.sh script so that if astyle cannot be found then it immediately aborts... X-Git-Tag: 1.5.0rc2~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a676bfaeef0eaf9710baea0ad9fafa7075c2ca20;p=postgis Fix astyle.sh script so that if astyle cannot be found then it immediately aborts with an error. Per report from Nicklas. git-svn-id: http://svn.osgeo.org/postgis/trunk@5173 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/astyle.sh b/astyle.sh index 96357a4cc..939668826 100755 --- 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