Skip to content

Commit

Permalink
misc: check that astyle exists
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
  • Loading branch information
Ivan-Velickovic committed Jul 15, 2024
1 parent 8c660fd commit be8b703
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions misc/style-c.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
#
# SPDX-License-Identifier: BSD-2-Clause
#
set -e

if ! command -v astyle >/dev/null 2>&1
then
echo "astyle could not be found, it must be available to run the script."
exit 1
fi

# Format (in place) a list of files as C code.
astyle --options="${0%/*}/astylerc" "$@"
Expand Down

0 comments on commit be8b703

Please sign in to comment.