-
Notifications
You must be signed in to change notification settings - Fork 69
/
rebuild.sh
executable file
·53 lines (47 loc) · 982 Bytes
/
rebuild.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
./clean.sh
list=$(find egroot/src -type d)
for p in $list; do
if [ -n "$(find $p -maxdepth 1 -type f -name '*.go' |egrep -v '/_|/os|linux')" ]; then
cd $p
printf "%-44s " ${p#*/*/}
result=$(egc $@ 2>&1)
if [ "$result" ]; then
echo "Error:"
echo
echo "$result"
echo
else
echo OK
fi
cd - >/dev/null
fi
done
list=$(find egpath/src/*/examples -type d)
for p in $list; do
if [ -n "$(find $p -maxdepth 1 -type f -name '*.go' |grep -v '/_')" ]; then
cd $p
if [ -x ../build.sh ]; then
printf "%-44s " ${p#*/*/}
result=$(../build.sh $@ 2>&1)
if [ "$result" ]; then
overflow=$(
echo $result |grep "region \`.*' overflowed by .* bytes" \
|sed "s/.*region \`\(.*\)' overflowed by \(.*\) b.*/\1 overflow: \2 B/g"
)
if [ "$overflow" ]; then
echo "$overflow"
else
echo "Error:"
echo
echo "$result"
echo
fi
else
echo OK
fi
fi
cd - >/dev/null
fi
done
echo "--"