aboutsummaryrefslogtreecommitdiff
path: root/format.sh
diff options
context:
space:
mode:
authorPascal Bühler <pabuhler@cisco.com>2017-10-05 20:15:11 +0200
committerGitHub <noreply@github.com>2017-10-05 20:15:11 +0200
commita6eda52042365fb91c3696a5edfe5b491c2d3cc5 (patch)
tree257b686b20d1690d65d82f48c291d795382a25bb /format.sh
parented0fdd67da14a70e77c95e0fffc854de8da69991 (diff)
parent4e4740200b0aa916c4b365e7ae86cb47f7d7b045 (diff)
downloadlibsrtp2-a6eda52042365fb91c3696a5edfe5b491c2d3cc5.tar.gz
Merge pull request #361 from pabuhler/clang-format-12
clang-format remaining files
Diffstat (limited to 'format.sh')
-rwxr-xr-xformat.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/format.sh b/format.sh
new file mode 100755
index 0000000..5377f2a
--- /dev/null
+++ b/format.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+#
+# format.sh
+#
+# run clang-format on each .c & .h file
+
+if [ -z "${CLANG_FORMAT}" ]; then
+ CLANG_FORMAT=clang-format
+fi
+
+a=`git ls-files | grep "\.h$\|\.c$"`
+for x in $a; do
+ if [ $x != "config_in.h" ]; then
+ $CLANG_FORMAT -i -style=file $x
+ fi
+done