osb/scripts/format-source.sh
2023-06-20 14:33:09 +10:00

12 lines
253 B
Bash

#!/bin/sh
cd "`dirname \"$0\"`/../source"
: ${CLANG_FORMAT:=clang-format}
for file in *; do
if [ $file != "extern" -a -d $file ]; then
find $file \( -name '*.cpp' -or -name '*.hpp' \) -exec $CLANG_FORMAT -fallback-style=none -i {} \;
fi
done