This is an automated email from the ASF dual-hosted git repository.

felixybw pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new 17697fa6e Update script (#6006)
17697fa6e is described below

commit 17697fa6e72de53cc9aa7c3c8b99b0f17f679f9e
Author: Ankita Victor <[email protected]>
AuthorDate: Fri Jun 7 04:19:33 2024 +0530

    Update script (#6006)
    
    Update formatcppcode.sh to install clang 15 if not present.
---
 dev/formatcppcode.sh | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/dev/formatcppcode.sh b/dev/formatcppcode.sh
index d391235da..4ce4155f7 100755
--- a/dev/formatcppcode.sh
+++ b/dev/formatcppcode.sh
@@ -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 {} \;
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to