File: format.sh

package info (click to toggle)
spdlog 1%3A1.8.1%2Bds-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,484 kB
  • sloc: cpp: 18,681; ansic: 2,754; makefile: 38; sh: 32; python: 12
file content (16 lines) | stat: -rwxr-xr-x 546 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

cd "$(dirname "$0")"/..
pwd
echo -n "Running dos2unix     "
find . -name "*\.h" -o -name "*\.cpp"|grep -v bundled|xargs -I {} sh -c "dos2unix '{}' 2>/dev/null; echo -n '.'"
echo
echo -n "Running clang-format "
find . -name "*\.h" -o -name "*\.cpp"|grep -v bundled|xargs -I {} sh -c "clang-format -i {}; echo -n '.'"
echo
echo -n "Running cmake-format "
find . -name "CMakeLists.txt" -o -name "*\.cmake"|grep -v bundled|xargs -I {} sh -c "cmake-format --line-width 120 --tab-size 4 --max-subgroups-hwrap 4 -i {}; echo -n '.'"
echo