-
Notifications
You must be signed in to change notification settings - Fork 1
/
wow_update.sh
56 lines (40 loc) · 1021 Bytes
/
wow_update.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
#!/bin/bash
path=/home/v/azerothcore-wotlk
killall -9 authserver
tmux send-keys -t 2 'saveall' Enter
tmux send-keys -t 2 'server shutdown 10' Enter
while ps -p $(pidof worldserver) > /dev/null; do
sleep 1
done
#killall -9 worldserver
killall -9 htop
tmux kill-server
screen -S wow -X quit
echo "Tasks gekillt"
cd ${path}
git pull origin
cd ${path}/modules
for d in * ; do
if [ -d "$d" ]; then
cd ${d}
git pull origin
cd ..
fi
done
cd ..
echo "GIT geupdatet"
mkdir build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=$HOME/server/ -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DWITH_WARNINGS=1 -DTOOLS_BUILD=all -DSCRIPTS=static -DMODULES=static
make -j $(nproc)
make install
echo "Compiling beendet"
cd ../..
rm -rf ${path}/build
echo "CMake Cache geloescht"
mysqldump -u wow -p'wow' auth > auth.sql
mysqldump -u wow -p'wow' characters > characters.sql
echo "auth und characters gedumpt"
$HOME/server/bin/dbimport
echo "DB geupdatet"
./server.sh