1 2 3 4 5 6 7 8 9 10
#!/bin/sh THIS_PATH="$(realpath "$0")" THIS_DIR="$(dirname "$THIS_PATH")" FILE_LIST="$(find "$THIS_DIR" | grep -E ".*(\.cpp|\.c|\.inl)$")" echo -e "Files found to format = \n\"\"\"\n$FILE_LIST\n\"\"\"" clang-format --verbose -i --style=file $FILE_LIST