2019-07-01 12:37:18 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2020-02-25 18:52:35 +02:00
|
|
|
cd "$(dirname "$0")"/..
|
|
|
|
|
pwd
|
2023-09-25 16:07:56 +03:00
|
|
|
find_sources="find include src tests example bench -not ( -path include/spdlog/fmt/bundled -prune ) -type f -name *\.h -o -name *\.cpp"
|
2018-03-17 12:49:31 +02:00
|
|
|
echo -n "Running dos2unix "
|
2023-09-25 16:07:56 +03:00
|
|
|
$find_sources | xargs -I {} sh -c "dos2unix '{}' 2>/dev/null; echo -n '.'"
|
2018-03-17 12:47:04 +02:00
|
|
|
echo
|
|
|
|
|
echo -n "Running clang-format "
|
2023-09-25 16:07:56 +03:00
|
|
|
|
|
|
|
|
$find_sources | xargs -I {} sh -c "clang-format -i {}; echo -n '.'"
|
|
|
|
|
|
2018-03-17 12:47:04 +02:00
|
|
|
echo
|
2020-05-02 11:34:04 +03:00
|
|
|
echo -n "Running cmake-format "
|
2023-09-25 16:07:56 +03:00
|
|
|
find . -type f -name "CMakeLists.txt" -o -name "*\.cmake"|grep -v bundled|grep -v build|xargs -I {} sh -c "cmake-format --line-width 120 --tab-size 4 --max-subgroups-hwrap 4 -i {}; echo -n '.'"
|
2020-05-02 11:34:04 +03:00
|
|
|
echo
|
|
|
|
|
|
2018-03-09 14:27:15 +02:00
|
|
|
|
|
|
|
|
|