forked from KCL-Planning/VAL
-
Notifications
You must be signed in to change notification settings - Fork 1
/
format.sh
executable file
·35 lines (32 loc) · 903 Bytes
/
format.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
echo "Format code using Google style "
for a in applications libraries; do
#echo $a
pushd $a > /dev/null
for b in *; do
if [ -d $b ]
then
#echo $b
pushd $b > /dev/null
for c in *; do
if [ -d $c ]
then
#echo $c
pushd $c > /dev/null
for f in *.{h,cpp}; do
if [ -f $f ]
then
echo -n "Formatting $a/$b/$c/$f ... "
clang-format-3.9 -style=file -i $f
echo Formatted
fi
done
rm *.h-* *.cpp-*
popd > /dev/null
fi
done
popd > /dev/null
fi
done
popd > /dev/null
done