-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·164 lines (133 loc) · 2.9 KB
/
setup.sh
File metadata and controls
executable file
·164 lines (133 loc) · 2.9 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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
#!/bin/bash
UPDATE_POCKETMINE_CORE="no"
THREADS=8
COMPILE_BIN="no"
BUILD_POCKETMINE_CORE="no"
BUILD_POCKETMINE_DOCKER="no"
while getopts "::ujcdph" OPTION; do
case $OPTION in
u)
echo "[opt] Update PocketMine-MP repository to latest version"
UPDATE_POCKETMINE_CORE="yes"
;;
j)
echo "[opt] Set make threads to $OPTARG"
THREADS="$OPTARG"
;;
c)
echo "[opt] Update PocketMine-MP repository to latest version"
echo "[opt] PocketMine-MP build core set to YES"
UPDATE_POCKETMINE_CORE="yes"
BUILD_POCKETMINE_CORE="yes"
;;
d)
echo "[opt] Update PocketMine-MP repository to latest version"
echo "[opt] PocketMine-MP build core set to YES"
echo "[opt] PocketMine-MP docker image build set to YES"
UPDATE_POCKETMINE_CORE="yes"
BUILD_POCKETMINE_CORE="yes"
BUILD_POCKETMINE_DOCKER="yes"
;;
p)
echo "[opt] Recompile PHP7 set to YES"
COMPILE_BIN="yes"
;;
h)
echo "FatcraftPE setup script help :"
echo ""
echo "-u Update PocketMine-MP repository to latest version"
echo "-j 8 Set make threads to 8"
echo "-c Update PocketMine-MP repository & PocketMine-MP build core"
echo "-d Update PocketMine-MP repository & PocketMine-MP build core & PocketMine-MP docker image build"
echo "-h Display this help section"
exit 0
;;
\?)
echo "Invalid option: -$OPTION$OPTARG" >&2
exit 1
;;
esac
done
# Setup custom PocketMineMP & PocketMine-DevTools
if [ "$UPDATE_POCKETMINE_CORE" == "yes" ]; then
git submodule init
git submodule update --recursive
fi
if [ "$BUILD_POCKETMINE_CORE" == "yes" ]; then
rm -f cores/PocketMine-MP.phar
fi
if [ "$COMPILE_BIN" == "yes" ]; then
cd PocketMine-MP
./compile.sh
cd ../
fi
# Build server core
cd cores/
./install_cores.sh
cd ../
cd plugins/
./install_plugins.sh
cd ../
cd Dockerfiles/
if [ "$BUILD_POCKETMINE_DOCKER" == "yes" ]; then
cd PocketMineMP-php7/
./docker_build.sh
cd ../
fi
#cd entry-lb/
#./docker_build.sh
#cd ../
cd lobby/
./docker_build.sh
cd ../
cd hg-1/
./docker_build.sh
cd ../
cd hg-2/
./docker_build.sh
cd ../
cd pk-1/
./docker_build.sh
cd ../
cd sw-1/
./docker_build.sh
cd ../
cd sw-2/
./docker_build.sh
cd ../
cd sw-3/
./docker_build.sh
cd ../
cd sw-4/
./docker_build.sh
cd ../
cd sw-5/
./docker_build.sh
cd ../
cd bw-1/
./docker_build.sh
cd ..
cd bw-2/
./docker_build.sh
cd ..
cd bw-3/
./docker_build.sh
cd ..
cd md-1/
./docker_build.sh
cd ..
cd md-2/
./docker_build.sh
cd ..
cd br-1/
./docker_build.sh
cd ..
cd br-2/
./docker_build.sh
cd ..
cd bb-1/
./docker_build.sh
cd ..
cd shop/
./docker_build.sh
cd ..