diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-30 12:35:12 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-03-30 12:35:12 +0200 |
| commit | 432e353dce0277c795445e60f90c8271ebd8fa2e (patch) | |
| tree | b6f789650e11ac78ae04f5f494a5eccc3df0e34e /format.sh | |
| parent | a0e45899e6265ea46d8ab9a1f4a126f52613109c (diff) | |
cc/scripts: Tailor format.sh according to current repository.
Diffstat (limited to 'format.sh')
| -rwxr-xr-x | format.sh | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -1,16 +1,10 @@ -#!/bin/bash +#!/bin/sh THIS_PATH="$(realpath "$0")" THIS_DIR="$(dirname "$THIS_PATH")" -# Find all files in THIS_DIR which end in .ino, .cpp, etc., as specified -# in the regular expression just below -FILE_LIST="$(find "$THIS_DIR" | grep -E ".*(\.ino|\.cpp|\.c|\.h|\.hpp|\.h|\.cc|\.hh)$")" +FILE_LIST="$(find "$THIS_DIR" | grep -E ".*(\.cc|\.c|\.h|\.inl)$")" echo -e "Files found to format = \n\"\"\"\n$FILE_LIST\n\"\"\"" -# Format each file. -# - NB: do NOT put quotes around `$FILE_LIST` below or else the `clang-format` command will -# mistakenly see the entire blob of newline-separated file names as a SINGLE file name instead -# of as a new-line separated list of *many* file names! -clang-format --verbose -i --style=file $FILE_LIST +clang-format --verbose -i --style=file $FILE_LIST
\ No newline at end of file |
