2021-12-01 16:08:28 +01:00
|
|
|
#!/bin/bash
|
|
|
|
if [[ ! -f README.md ]]; then
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
2022-05-13 11:34:44 +02:00
|
|
|
cmake_fmt="python3 -m cmake-format"
|
|
|
|
if command -v ${cmake_fmt} &> /dev/null
|
2022-05-13 11:35:18 +02:00
|
|
|
cmake_fmt_cmd="${cmake_fmt} -i CMakeLists.txt"
|
2022-05-13 11:34:44 +02:00
|
|
|
eval ${cmake_fmt_cmd}
|
|
|
|
then
|
|
|
|
|
2021-12-07 13:14:57 +01:00
|
|
|
find ./src -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
|
|
|
find ./hal -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
|
|
|
find ./tests -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|