servatrice/clangify.sh
2018-02-06 08:45:13 -05:00

18 lines
507 B
Bash
Executable file

#!/bin/bash
# This script will run clang-format on all non-3rd-party C++/Header files.
set -e
if hash clang-format 2>/dev/null; then
find . \( -name "*.cpp" -o -name "*.h" \) \
-not -path "./cockatrice/src/qt-json/*" \
-not -path "./servatrice/src/smtp/*" \
-not -path "./common/sfmt/*" \
-not -path "./oracle/src/zip/*" \
-not -path "./build*/*" \
-exec clang-format -style=file -i {} \;
echo "Repository properly formatted"
else
echo "Please install clang-format to use this program"
fi