[Tizen] Disable jithost arena cache
[platform/upstream/coreclr.git] / src / corefx / format-code.sh
1 #!/usr/bin/env bash
2
3 # OS X names clang-format as clang-format; Ubuntu uses
4 # clang-format-version so check for the right one
5 if command -v "clang-format-3.6" > /dev/null; then
6    export CF="$(command -v clang-format-3.6)"
7 elif command -v "clang-format" > /dev/null; then
8    export CF="$(command -v clang-format)"
9 else
10    echo "Unable to find clang-format"
11    exit 1
12 fi
13
14 cd $(dirname "$0")
15
16 for D in */; do
17     for file in "${D}"*.cpp; do
18         if [ -e $file ] ; then
19             $CF -style=file -i "$file"
20         fi
21     done
22    
23     for file in "${D}"*.h ; do
24         if [ -e $file ] ; then
25             $CF -style=file -i "$file"
26         fi
27     done
28
29     for file in "${D}"*.hpp ; do
30         if [ -e $file ] ; then
31             $CF -style=file -i "$file"
32         fi
33     done
34
35    for file in "${D}"*.in ; do
36        if [ -e $file ] ; then
37             $CF -style=file -i "$file"
38        fi
39    done
40 done