cleanup.sh (350B)
1 #!/bin/sh 2 # 3 # cleanup.sh -- format and tidy 4 # 5 6 if ! command -v clang-format 2>&1 >/dev/null; then 7 echo "cleanup.sh: don't have clang-format" 8 exit 1 9 fi 10 11 if ! command -v clang-tidy 2>&1 >/dev/null; then 12 echo "cleanup.sh: don't have clang-tidy" 13 exit 1 14 fi 15 16 # when I add a header add *.h below 17 # vvv 18 for f in *.c; do 19 clang-format -i $f 20 done 21