diff --git a/tools/run-clang-format.sh b/tools/run-clang-format.sh new file mode 100755 index 00000000..4e88d1ec --- /dev/null +++ b/tools/run-clang-format.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -e +source $(dirname $0)/env.sh + +cd $LUNA_ROOT + +SOURCES=($(find kernel/src -type f | grep "\.c") $(find kernel/include -type f)) +SOURCES+=($(find libs/libc/src -type f | grep "\.c") $(find libs/libc/include -type f)) +SOURCES+=($(find apps/src -type f)) + +for f in ${SOURCES[@]} +do + clang-format $f -i +done \ No newline at end of file