Skip to content

Commit

Permalink
Update script (#6006)
Browse files Browse the repository at this point in the history
Update formatcppcode.sh to install clang 15 if not present.
  • Loading branch information
acvictor authored Jun 6, 2024
1 parent 60b8aad commit 17697fa
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion dev/formatcppcode.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
cd `dirname $0`

# Check if clang-format-15 is installed
if ! command -v clang-format-15 &> /dev/null
then
echo "clang-format-15 could not be found"
echo "Installing clang-format-15..."
sudo apt update
sudo apt install clang-format-15
fi

find ../cpp/core -regex '.*\.\(cc\|hpp\|cu\|c\|h\)' -exec clang-format-15 -style=file -i {} \;
find ../cpp/velox -regex '.*\.\(cc\|hpp\|cu\|c\|h\)' -exec clang-format-15 -style=file -i {} \;
find ../cpp/velox -regex '.*\.\(cc\|hpp\|cu\|c\|h\)' -exec clang-format-15 -style=file -i {} \;

0 comments on commit 17697fa

Please sign in to comment.