[Bf-blender-cvs] [ec9c6edae00] temp-clang-format: clang-format-migration.sh: support passing in files paths to operate on
Campbell Barton
noreply at git.blender.org
Tue Jan 8 04:41:27 CET 2019
Commit: ec9c6edae00c72e8f8527893e18d31575c9a9e58
Author: Campbell Barton
Date: Tue Jan 8 14:40:14 2019 +1100
Branches: temp-clang-format
https://developer.blender.org/rBec9c6edae00c72e8f8527893e18d31575c9a9e58
clang-format-migration.sh: support passing in files paths to operate on
Running on all source is tedious when iterating on config tweaks.
===================================================================
M clang-format-migration.sh
===================================================================
diff --git a/clang-format-migration.sh b/clang-format-migration.sh
index 5ef24e656f6..9477cb0018d 100755
--- a/clang-format-migration.sh
+++ b/clang-format-migration.sh
@@ -1,12 +1,24 @@
#!/bin/bash
+# Optionally pass in files to operate on.
+
+if [[ "$#" -eq 0 ]]; then
+ GIT_PATHS="\
+intern/clog \
+intern/ghost \
+intern/guardedalloc/ \
+intern/string/ \
+source/ \
+"
+else
+ GIT_PATHS="$@"
+fi
+
+echo "Operating on: $GIT_PATHS"
+
FILES=$(
git ls-tree -r HEAD \
- intern/clog/ \
- intern/ghost/ \
- intern/guardedalloc/ \
- intern/string/ \
- source/ \
+ $GIT_PATHS \
--name-only |
egrep \\.\(c\|cc\|cpp\|cxx\|h\|hh\|hpp\|hxx\|m\|mm\|osl\|glsl\)$
)
More information about the Bf-blender-cvs
mailing list