Skip to content

Commit 496255c

Browse files
mdcornupablodelara
authored andcommitted
tools: format source files in parallel
Signed-off-by: Marcel Cornu <[email protected]>
1 parent 0231d31 commit 496255c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/format.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ if [ $(clang_format_version) -ge $clang_format_min_version ]; then
3636
echo "Formatting files using clang-format v$(clang_format_version)..."
3737
for f in `git ls-files '*.[c|h]'`; do
3838
[ "$verbose" -gt 0 ] && echo "formatting $f"
39-
$clang_format -style=file -i "$f"
39+
$clang_format -style=file -i "$f" &
4040
done
4141
else
4242
echo "clang-format version ${clang_format_min_version}+ is required!"
4343
fi
44+
45+
# wait for background processes to finish
46+
wait

0 commit comments

Comments
 (0)