summaryrefslogtreecommitdiffstats
path: root/contrib/local/beautifyCode.sh
blob: 8e36b8d2dabcfbfd76b291a80c06a51fdb4255d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash

# see http://astyle.sourceforge.net/astyle.html
# run from project root as sh ./contrib/tidy_source.sh

set -e

ME=`basename $0`
DIR="$( cd "$( dirname "$0" )" && pwd )"
CWD=`pwd`

find ${DIR}/../../ -name ".DS_Store" -exec rm {} \;

astyle  \
	--style=java \
	--indent=tab \
	--recursive "${DIR}/../../src/*.cpp" "${DIR}/../../src/*.h"
find ${DIR}/../../src/ -iname '*.orig' -exec rm {} \;

astyle  \
	--style=java \
	--indent=tab \
	--recursive "${DIR}/../../test/*.cpp"
find ${DIR}/../../test/ -iname '*.orig' -exec rm {} \;