-
Notifications
You must be signed in to change notification settings - Fork 1
/
find-max-depth-allg.sh
48 lines (44 loc) · 1.03 KB
/
find-max-depth-allg.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
#!/usr/bin/bash
# glob patterns
shopt -s globstar
# Get full path of this script, and root.
full_path_script=$(realpath $0)
full_path_script_dir=`dirname $full_path_script`
full_path_templates=$(dirname $full_path_script)/templates
rm -rf `find . -name 'Generated*' -type d`
descs=`find . -name desc.xml`
for i in $descs
do
echo "i = $i"
d=`dirname $i`
pushd $d > /dev/null
d=`pwd`
g=${d##*$root/}
testname=$g
rm -rf Generated-*
dotnet trgen -- -t CSharp
if [ "$?" -ne 0 ]
then
continue
fi
for j in Generated-*
do
pushd $j 2> /dev/null
bash build.sh
status="$?"
if [ "$status" -ne 0 ]
then
echo Fail.
continue
fi
files_exp=`grep "files2=" test.sh | sed 's#^.*find ##' | sed 's# -type f.*$##'`
files=`find $files_exp -type f | grep -v '.errors$' | grep -v '.tree$'`
for k in $files
do
bash $full_path_script_dir/max-depth.sh $k
done
popd 2> /dev/null
rm -rf $j
done
popd 2> /dev/null
done