Update FSFW from Upstream #27
@ -1,21 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [[ ! -f README.md ]]; then
|
if [[ ! -f README.md ]]; then
|
||||||
cd ..
|
cd ..
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cmake_fmt="cmake-format"
|
cmake_fmt="cmake-format"
|
||||||
if command -v ${cmake_fmt} &> /dev/null; then
|
if command -v ${cmake_fmt} &> /dev/null; then
|
||||||
cmake_fmt_cmd="${cmake_fmt} -i CMakeLists.txt"
|
cmake_fmt_cmd="${cmake_fmt} -i CMakeLists.txt"
|
||||||
eval ${cmake_fmt_cmd}
|
eval ${cmake_fmt_cmd}
|
||||||
else
|
else
|
||||||
echo "No ${cmake_fmt} tool found, not formatting CMake files"
|
echo "No ${cmake_fmt} tool found, not formatting CMake files"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cpp_format="clang-format"
|
cpp_format="clang-format"
|
||||||
if command -v ${cpp_format} &> /dev/null; then
|
if command -v ${cpp_format} &> /dev/null; then
|
||||||
find ./src -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
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 ./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
|
find ./tests -iname *.h -o -iname *.cpp -o -iname *.c | xargs clang-format --style=file -i
|
||||||
else
|
else
|
||||||
echo "No ${cpp_format} tool found, not formatting C++/C files"
|
echo "No ${cpp_format} tool found, not formatting C++/C files"
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user