Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1137)

Unified Diff: third_party/libvpx/source/libvpx/tools/vpx-astyle.sh

Issue 1158913006: Move libvpx from DEPS to src (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add DEPS file with #include paths Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libvpx/source/libvpx/tools/vpx-astyle.sh
diff --git a/third_party/libvpx/source/libvpx/tools/vpx-astyle.sh b/third_party/libvpx/source/libvpx/tools/vpx-astyle.sh
new file mode 100755
index 0000000000000000000000000000000000000000..6340426bdcd96788d2018bad248410359e1146c9
--- /dev/null
+++ b/third_party/libvpx/source/libvpx/tools/vpx-astyle.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+set -e
+astyle --style=java --indent=spaces=2 --indent-switches\
+ --min-conditional-indent=0 \
+ --pad-oper --pad-header --unpad-paren \
+ --align-pointer=name \
+ --indent-preprocessor --convert-tabs --indent-labels \
+ --suffix=none --quiet --max-instatement-indent=80 "$@"
+# Disabled, too greedy?
+#sed -i 's;[[:space:]]\{1,\}\[;[;g' "$@"
+
+sed_i() {
+ # Incompatible sed parameter parsing.
+ if sed -i 2>&1 | grep -q 'requires an argument'; then
+ sed -i '' "$@"
+ else
+ sed -i "$@"
+ fi
+}
+
+sed_i -e 's/[[:space:]]\{1,\}\([,;]\)/\1/g' \
+ -e 's/[[:space:]]\{1,\}\([+-]\{2\};\)/\1/g' \
+ -e 's/,[[:space:]]*}/}/g' \
+ -e 's;//\([^/[:space:]].*$\);// \1;g' \
+ -e 's/^\(public\|private\|protected\):$/ \1:/g' \
+ -e 's/[[:space:]]\{1,\}$//g' \
+ "$@"

Powered by Google App Engine
This is Rietveld 408576698