diff options
author | iphydf <iphydf@users.noreply.github.com> | 2016-09-07 11:09:00 +0100 |
---|---|---|
committer | iphydf <iphydf@users.noreply.github.com> | 2016-09-07 23:11:13 +0100 |
commit | 159dc3b6ab0fa969722aabce70b04b3f6ec6f777 (patch) | |
tree | 30cbc9926f1064ce5a9d23b2c37a477dcd01c5a7 /other/astyle | |
parent | 27a162608469b4dacd251b703ca2b9867bd7c0d3 (diff) |
Print a message about missing astyle in format-source.
Diffstat (limited to 'other/astyle')
-rwxr-xr-x | other/astyle/format-source | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/other/astyle/format-source b/other/astyle/format-source index fc81f744..157f0fec 100755 --- a/other/astyle/format-source +++ b/other/astyle/format-source | |||
@@ -10,10 +10,16 @@ if [ -z "$SOURCE_DIR" ]; then | |||
10 | fi | 10 | fi |
11 | cd "$SOURCE_DIR" | 11 | cd "$SOURCE_DIR" |
12 | 12 | ||
13 | if [ -z "$ASTYLE" ]; then | 13 | if [ -z "$ASTYLE" ] || ! which "$ASTYLE"; then |
14 | ASTYLE=astyle | 14 | ASTYLE=astyle |
15 | fi | 15 | fi |
16 | 16 | ||
17 | if ! which "$ASTYLE"; then | ||
18 | # If we couldn't find or install an astyle binary, don't do anything. | ||
19 | echo "Could not find an astyle binary; please install astyle." | ||
20 | exit 1 | ||
21 | fi | ||
22 | |||
17 | if [ -f ../apidsl/_build/apigen.native ]; then | 23 | if [ -f ../apidsl/_build/apigen.native ]; then |
18 | APIDSL=../apidsl/_build/apigen.native | 24 | APIDSL=../apidsl/_build/apigen.native |
19 | else | 25 | else |