Revision 50d91bdfc94cb9d3aa01634ac0b003d76e799bf1 authored by Tobias Ellinghaus on 04 May 2017, 21:56:48 UTC, committed by Tobias Ellinghaus on 04 May 2017, 21:56:48 UTC
1 parent c2e0a27
beautify_style.sh
#!/bin/bash
# this uses clang-format to standardize our indentation/braces etc
# change if your executable is named different
CLANG_FORMAT=clang-format-3.6
# add all the files and directories that may not be reformatted, relative to src/
IGNORE_SET=(
external
common/noiseprofiles.h
common/colormatrices.c
common/nvidia_gpus.h
)
####################################################################################
function join { local IFS="$1"; shift; echo "$*"; }
IGNORE_SET=(${IGNORE_SET[@]/#/^src/})
IGNORE_STRING=$(join \| "${IGNORE_SET[@]}")
SOURCES=$(find src | egrep -v ${IGNORE_STRING} | egrep "\.h$|\.hh$|\.c$|\.cc$")
for FILE in $SOURCES
do
${CLANG_FORMAT} -i $FILE
done
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...