-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·75 lines (65 loc) · 1.65 KB
/
build.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
clr='\033[1;33m'
red='\033[0;31m'
nc='\033[0m'
# ============= Building ================
# Build Proto Compiler
echo -e "${clr}Building protoc compiler${nc}"
cd proto/compiler
echo -e "${clr}Checking prerequisites for building protoc${nc}"
./pre-build.sh
if [ $? -ne 0 ]; then
echo -e "${red}Error launching carkot/proto/compiler/pre-build.sh${nc}"
exit 1
fi
echo -e "${clr}Building protoc${nc}"
make
if [ $? -ne 0 ]; then
echo -e "${red}Error building protoc with carkot/proto/compiler/Makefile ${nc}"
exit 1
fi
cd ../../
# Compile proto-files
echo -e "${clr}Compiling proto-files sources${nc}"
cd proto/protofiles_sources
./compile_proto.sh
if [ $? -ne 0 ]; then
echo -e "${red}Error compiling proto-files with carkot/proto/protofiles_sources/compile_proto.sh${nc}"
exit 1
fi
cd ../../
# Build central server
echo -e "${clr}Building central server${nc}"
cd server
./gradlew build
if [ $? -ne 0 ]; then
echo -e "${red}Error building central server with carkot/server/gradlew build${nc}"
exit 1
fi
cd ../
# Build Raspberry server
echo -e "${clr}Building Raspberry Pi server${nc}"
cd car_srv/kotlinSrv
./build.sh
if [ $? -ne 0 ]; then
echo -e "${red}Error building Raspberry Pi server with carkot/car_srv/kotlinSrv/build.sh${nc}"
exit 1
fi
cd ../../
# Build Kotlin->Native translator
echo -e "${clr}Building translator${nc}"
cd translator
./gradlew jar
if [ $? -ne 0 ]; then
echo -e "${red}Error building translator with translator/gradlew jar${nc}"
exit 1
fi
cd ../
# Build Kotstd libary for translator
echo -e "${clr}Building Kotstd${nc}"
cd kotstd
make
if [ $? -ne 0 ]; then
echo -e "${red}Error building Kotlin STDlib with kotstd/Makefile${nc}"
exit 1
fi