Ben Clayton | d4e6447 | 2019-02-01 08:18:19 +0000 | [diff] [blame] | 1 | SRC_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
| 2 | |
Ben Clayton | d4e6447 | 2019-02-01 08:18:19 +0000 | [diff] [blame] | 3 | for DIR in "Device" "Pipeline" "Reactor" "System" "Vulkan" "WSI" |
| 4 | do |
| 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" |
| 12 | done |
Ben Clayton | d4e6447 | 2019-02-01 08:18:19 +0000 | [diff] [blame] | 13 | |