diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-09-04 21:36:52 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-09-04 21:36:52 (GMT) |
commit | 30c7264c2ca0f169b099b6ebbf13c5bd71652ebc (patch) | |
tree | 1a92edfa20e5e6dfe467b002227220c7f9d61cfd /bin/format_source_patch | |
parent | 6b71d6dc9453e8f94ac82732496ee59ca6495587 (diff) | |
download | hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.zip hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.tar.gz hdf5-30c7264c2ca0f169b099b6ebbf13c5bd71652ebc.tar.bz2 |
CMake and script changes for clang-format
Diffstat (limited to 'bin/format_source_patch')
-rw-r--r-- | bin/format_source_patch | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bin/format_source_patch b/bin/format_source_patch new file mode 100644 index 0000000..4c531ea --- /dev/null +++ b/bin/format_source_patch @@ -0,0 +1,14 @@ +#!/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
\ No newline at end of file |