-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathexamples_tools.sh
More file actions
executable file
·86 lines (62 loc) · 1.36 KB
/
examples_tools.sh
File metadata and controls
executable file
·86 lines (62 loc) · 1.36 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
git_clone()
{
local gitUrl=$1
local tagName=$2
echo $gitUrl
echo $tagName
git clone -b $tagName --depth 1 $gitUrl
}
#-------------------------------------------------------------------------------
run_analyze()
{
local outPutFile="output_unix.txt"
cppinclude > $outPutFile
cat $outPutFile
}
#-------------------------------------------------------------------------------
run_analyze_git_repo()
{
local gitUrl=$1
local tagName=$2
git_clone $gitUrl $tagName
run_analyze
}
#-------------------------------------------------------------------------------
run_cmake()
{
local projectFolder=$1
mkdir build
cd build
cmake ../$projectFolder -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
cd -
}
#-------------------------------------------------------------------------------
run_analyze_git_repo_cmake()
{
local gitUrl=$1
local tagName=$2
local projectFolder=$3
run_cmake $projectFolder
run_analyze_git_repo $gitUrl $tagName
}
#-------------------------------------------------------------------------------
clean_example_dir()
{
local exampleDir=$1
cd $exampleDir
for dir in ./*/ ;
do (rm -rf $dir);
done
cd -
}
#-------------------------------------------------------------------------------
run_example()
{
local exampleDir=$1
if [ "$exampleDir" != "./tools/" ]; then
cd $exampleDir
./run.sh
cd -
clean_example_dir $exampleDir
fi
}