Files
hdf5/bin/format_source_patch
2020-09-24 12:36:25 -05:00

14 lines
307 B
Bash
Executable File

#!/bin/bash
find . -type d \( -path ./config \) -prune \
-o -iname *.h -o -iname *.c -o -iname *.cpp -o -iname *.hpp \
| xargs clang-format -style=file -i -fallback-style=none
git diff > clang_format.patch
# Delete if 0 size
if [ ! -s clang_format.patch ]
then
rm clang_format.patch
fi
exit 0