-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathinit-zsdn.sh
executable file
·119 lines (92 loc) · 2.09 KB
/
init-zsdn.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#!/bin/bash
# Script for initializing this ZSDN directory
echo "### Installing ZSDN environment ###"
echo ""
echo "Initializing zhe ZSDN environment"
echo "THIS MAY TAKE SOME TIME"
echo
ZDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo "Installing to directory: $ZDIR"
echo ""
echo "Press enter to continue or wait 10s (or Ctrl+C to cancel)"
read -t 10
cd $ZDIR
echo $ZDIR > ./util/zsdn-dir.txt
echo "set(ZSDN_DIR $ZDIR)" > ./util/zsdn-dir_cmake.txt
echo
echo "## Start init submodules"
git submodule init
git submodule update
echo "## Start Init hierarchy builder"
cd util/hierarchy-builder/hierarchy-builder
if mvn clean install -DskipTests=true; then
echo "# Init hierarchy builder success"
else
result=$?
echo "!! Failed to init hierarchy builder"
exit ${result}
fi
cd ../../..
echo "## Start Init module creator"
cd util/module-creator
if mvn clean install -DskipTests=true; then
echo "# Init module creator success"
else
result=$?
echo "!! Failed to init module creator"
exit ${result}
fi
cd ../..
echo "## Start Init module starter"
cd util/module-starter
if mvn clean install -DskipTests=true; then
echo "# Init module starter success"
else
result=$?
echo "!! Failed to init module starter"
exit ${result}
fi
cd ../..
echo "## Start Init startup selector"
cd util/startup-selector
if mvn clean install -DskipTests=true; then
echo "# Init startup selector success"
else
result=$?
echo "!! Failed to init startup selector"
exit ${result}
fi
cd ../..
cd util
# Init ZMF
if ! ./init_zmf.sh; then
result=$?
echo "!! Failed to init ZMF"
exit ${result}
fi
# Init JMF
if ! ./init_jmf.sh; then
result=$?
echo "!! Failed to init JMF"
exit ${result}
fi
echo
echo "## Start init ZSDN dependencies"
if ./init_dependencies.sh; then
echo "# Init ZSDN dependencies success"
else
result=$?
echo "!! Failed to init ZSDN dependencies"
exit ${result}
fi
cd ..
echo
echo "## Start build ZSDN core modules"
if ./build-modules.sh -m zsdn-webadmin; then
echo "# Build ALL success"
else
result=$?
echo "!! Failed to build ALL"
exit ${result}
fi
echo "### Installing ZSDN environment ###"