File: format.sh

package info (click to toggle)
cppgir 2.0%2Bgit20250629.2a7d9ce-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,220 kB
  • sloc: cpp: 16,451; ansic: 355; python: 86; makefile: 13; sh: 9
file content (12 lines) | stat: -rwxr-xr-x 303 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/bash
cd $1
echo -n "Running dos2unix     "
git ls-files | grep '\.cpp$\|\.h$\|\.hpp$' | \
  xargs -I {} sh -c "dos2unix '{}' 2>/dev/null; echo -n '.'"
echo
echo -n "Running clang-format "
git ls-files | grep '\.cpp$\|\.h$\|\.hpp$' | \
  xargs -I {} sh -c "clang-format -i {}; echo -n '.'"
echo