Skip to content

Commit

Permalink
Print a message about missing astyle in format-source.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Sep 7, 2016
1 parent 27a1626 commit 159dc3b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion other/astyle/format-source
Expand Up @@ -10,10 +10,16 @@ if [ -z "$SOURCE_DIR" ]; then
fi
cd "$SOURCE_DIR"

if [ -z "$ASTYLE" ]; then
if [ -z "$ASTYLE" ] || ! which "$ASTYLE"; then
ASTYLE=astyle
fi

if ! which "$ASTYLE"; then
# If we couldn't find or install an astyle binary, don't do anything.
echo "Could not find an astyle binary; please install astyle."
exit 1
fi

if [ -f ../apidsl/_build/apigen.native ]; then
APIDSL=../apidsl/_build/apigen.native
else
Expand Down

0 comments on commit 159dc3b

Please sign in to comment.