-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclang-format.sh
executable file
·18 lines (15 loc) · 974 Bytes
/
clang-format.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
# ------------------------------------------------------------------------------------------------ #
# #
# _) | | _) This code may be used and modified under the terms #
# | | | | | (_-< | _ \ \ of the MIT license. See the LICENSE file for details. #
# _| _| _| \_,_| ___/ _| \___/ _| _| Copyright (c) 2018-2019 Simon Schneegans #
# #
# ------------------------------------------------------------------------------------------------ #
# get the location of this script
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
# run clang-format on all source files
find src examples -iname "*.hpp" -o -iname "*.cpp"|while read file; do
echo "Formatting ${file}..."
clang-format -i $file
done