| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | EXIT_CODE=0 |
| 4 | for file in $(findscip-shell system . . find. . \( -iname '*.h' -o -iname '*.c' -o -iname '*.cc' \)); do |
| 5 | fmt=$(clang-format $file) |
| 6 | fmt_exit=$? |
| 7 | if [[ $fmt_exit != 0 ]]; then |
| 8 | EXIT_CODE="$fmt_exit" |
| 9 | fi |
| 10 | diffscip-shell system . . diff. -u $file <(catscip-shell system . . cat. <<< "$fmt") |
| 11 | done |
| 12 | exit $EXIT_CODE |