-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuild.sh
More file actions
executable file
·73 lines (65 loc) · 1.05 KB
/
Build.sh
File metadata and controls
executable file
·73 lines (65 loc) · 1.05 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
#!/usr/bin/zsh
current_dir=`pwd`
project_path=`pwd`
subproject_dirs=(UGEN GameTest);
run(){
if [[ ! ((-a ./GameTest/bin/GameTest)) ]]; then
#project_path=`pwd`
compile
fi
echo Running...
LD_LIBRARY_PATH=$current_dir/UGEN/lib ./GameTest/bin/GameTest
}
compile(){
cd $project_path;
for elem in $subproject_dirs; do
if [[ -d $elem ]]; then
echo "\n$elem: Compilation Started...";
pushd $elem;
make;
if [[ $? != 0 ]]; then
echo "Error..."
popd;
break;
fi;
popd;
fi;
done;
}
clean(){
if (( $# == 1 )); then
cd $1 2> /dev/null
[[ "$?" -eq "0" ]] && echo "Cleaning $1" && make clean && exit
echo "Project $1 not found..."
else
for elem in $subproject_dirs; do
if [[ -d $elem ]]; then
echo "Cleaning $elem";
pushd $elem
make clean
popd
fi;
done;
fi;
}
# if [[ $1 != 10 ]]; then
#statements
# zsh -i $(./Build.sh 10);
# fi;
case $1 in
compile)
compile
;;
clean)
clean $2
;;
run)
run
;;
rebuild)
clean
compile
;;
*)
echo "Usage: $0 [compile|run|rebuild|clean]"
esac