blob: 094a2d54c1e7cc390ce53390a79dadf4c7c42d74 [file] [log] [blame]
Ben Claytond4e64472019-02-01 08:18:19 +00001SRC_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
2
Ben Claytond4e64472019-02-01 08:18:19 +00003for DIR in "Device" "Pipeline" "Reactor" "System" "Vulkan" "WSI"
4do
5 # Double clang-format, as it seems that one pass isn't always enough
6 find ${SRC_DIR}/$DIR -iname "*.hpp" -o -iname "*.cpp" -o -iname "*.inl" | xargs clang-format -i
7 find ${SRC_DIR}/$DIR -iname "*.hpp" -o -iname "*.cpp" -o -iname "*.inl" | xargs clang-format -i
8
9 git add ${SRC_DIR}/$DIR
10 CHANGE_ID="$(echo $CHANGE_ID_SEED $DIR | openssl sha1)"
11 git commit -m "clang-format the src/$DIR directory" -m "Bug: b/144825072" -m "Change-Id:I$CHANGE_ID"
12done
Ben Claytond4e64472019-02-01 08:18:19 +000013