-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.sh
More file actions
76 lines (64 loc) · 1.45 KB
/
Copy pathbuild.sh
File metadata and controls
76 lines (64 loc) · 1.45 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
#!/bin/bash
plat="linux"
if [[ "$(uname)" = "FreeBSD" ]]; then
plat="freebsd"
fi
arc="x64"
arch=$(uname -m)
if [[ "$arch" == arm* ]] || [[ "$arch" == aarch64 ]]; then
arc="arm64"
fi
assetpath=$plat-$arc
if [[ $OSTYPE == darwin* ]]; then
plat="macos"
assetpath=$plat
fi
mkdir -p bin
mkdir -p bin/screens
mkdir -p bin/themes
echo -n "Platform: "
echo $plat-$arc
echo -n -e "Building \033[1msetup\033[0m..."
cd setup
gcc setup.c ../common/common.c -o setup
if [ $? -eq 0 ]; then
echo -e "\033[32;1mOK\033[0m"
else
echo -n "Result: "
echo $?
exit $?
fi
cp setup ../bin
cd ..
echo -n -e "Building \033[1mumrc-bridge\033[0m..."
cd umrc-bridge
gcc bridge.c ../common/common.c -o umrc-bridge -lssl -lcrypto -pthread
if [ $? -eq 0 ]; then
echo -e "\033[32;1mOK\033[0m"
else
echo -n "Result: "
echo $?
exit $?
fi
cp umrc-bridge ../bin
cd ..
echo -n -e "Building \033[1mumrc-client\033[0m..."
cd umrc-client
gcc main.c func.c ../common/common.c -o umrc-client -pthread -L ../lib/odoors/$plat-$arc -lODoors
if [ $? -eq 0 ]; then
echo -e "\033[32;1mOK\033[0m"
else
echo -n "Result: "
echo $?
exit $?
fi
cp umrc-client ../bin
cd ..
echo "Copying assets..."
cp changelog.txt ./bin/
cp LICENSE ./bin/
cp README.md ./bin/
cp -r ./assets/$assetpath/* ./bin/
cp -r ./assets/screens/* ./bin/screens/
cp -r ./assets/themes/* ./bin/themes/
echo -e "All jobs done. Check the \033[32;1mbin\033[0m subdirectory for the output files."