You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scripts/astyle/beautify_source_tree

30 lines
797 B

#!/bin/bash
if [[ $1 == "" ]]; then
echo "Please specify the source directory to beautify"
exit 1
fi
12 years ago
ASTYLEARGS=$( cat <<EOF
--indent=tab \
--indent-classes \
--indent-switches \
--indent-cases \
--indent-namespaces \
--indent-labels \
--indent-col1-comments \
\
--unpad-paren \
\
--style=java \
--add-brackets \
--break-closing-brackets \
--keep-one-line-statements
EOF
)
astyle $ASTYLEARGS --recursive $1/*.c || true
astyle $ASTYLEARGS --recursive $1/*.cc || true
astyle $ASTYLEARGS --recursive $1/*.cpp || true
astyle $ASTYLEARGS --recursive $1/*.h || true