summaryrefslogtreecommitdiff
path: root/.tools
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-04-09 11:00:49 -0300
committerJesusaves <cpntb1@ymail.com>2021-04-09 11:00:49 -0300
commit8a4bf716002a017de77fe7df301ef8e4aaf00a2e (patch)
tree4947d0b015baad639fa07133369e9a09c8a468bc /.tools
downloadserverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.tar.gz
serverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.tar.bz2
serverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.tar.xz
serverdata-8a4bf716002a017de77fe7df301ef8e4aaf00a2e.zip
Initial commit
Diffstat (limited to '.tools')
-rw-r--r--.tools/conf/mariadb/battle.conf32
-rw-r--r--.tools/conf/mariadb/char-server.conf31
-rw-r--r--.tools/conf/mariadb/constants.conf31
-rw-r--r--.tools/conf/mariadb/inter-server.conf32
-rw-r--r--.tools/conf/mariadb/login-server.conf32
-rw-r--r--.tools/conf/mariadb/logs.conf32
-rw-r--r--.tools/conf/mariadb/map-server.conf32
-rw-r--r--.tools/conf/mariadb/msg_conf.txt0
-rw-r--r--.tools/conf/mariadb/ports.conf8
-rw-r--r--.tools/conf/mariadb/script.conf32
-rw-r--r--.tools/conf/mariadb/socket.conf32
-rw-r--r--.tools/conf/mariadb/sql_connection.conf52
-rw-r--r--.tools/conf/mysql/battle.conf32
-rw-r--r--.tools/conf/mysql/char-server.conf31
-rw-r--r--.tools/conf/mysql/constants.conf31
-rw-r--r--.tools/conf/mysql/inter-server.conf32
-rw-r--r--.tools/conf/mysql/login-server.conf32
-rw-r--r--.tools/conf/mysql/logs.conf32
-rw-r--r--.tools/conf/mysql/map-server.conf32
-rw-r--r--.tools/conf/mysql/msg_conf.txt0
-rw-r--r--.tools/conf/mysql/ports.conf8
-rw-r--r--.tools/conf/mysql/script.conf32
-rw-r--r--.tools/conf/mysql/socket.conf32
-rw-r--r--.tools/conf/mysql/sql_connection.conf52
-rwxr-xr-x.tools/jobs/build.sh15
-rwxr-xr-x.tools/jobs/cloneall.sh5
-rwxr-xr-x.tools/jobs/clonedata.sh5
-rwxr-xr-x.tools/jobs/initdb.sh23
-rwxr-xr-x.tools/jobs/install.sh10
-rwxr-xr-x.tools/jobs/newlines.sh10
-rwxr-xr-x.tools/jobs/runserver.sh38
-rwxr-xr-x.tools/jobs/runservervalgrind.sh37
-rwxr-xr-x.tools/jobs/spaces.sh10
-rw-r--r--.tools/npc/motd-debug-text.txt4
-rwxr-xr-x.tools/scripts/init.sh217
35 files changed, 1066 insertions, 0 deletions
diff --git a/.tools/conf/mariadb/battle.conf b/.tools/conf/mariadb/battle.conf
new file mode 100644
index 00000000..ff05022c
--- /dev/null
+++ b/.tools/conf/mariadb/battle.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Battle local configuration file.
+//=========================================================================
+
+battle_configuration: {
+ // See conf/map/battle.conf for details
+}
diff --git a/.tools/conf/mariadb/char-server.conf b/.tools/conf/mariadb/char-server.conf
new file mode 100644
index 00000000..448b8d18
--- /dev/null
+++ b/.tools/conf/mariadb/char-server.conf
@@ -0,0 +1,31 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Character Server local configuration file.
+//=========================================================================
+
+min_char_class: 0
+max_char_class: 6
diff --git a/.tools/conf/mariadb/constants.conf b/.tools/conf/mariadb/constants.conf
new file mode 100644
index 00000000..7d269595
--- /dev/null
+++ b/.tools/conf/mariadb/constants.conf
@@ -0,0 +1,31 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2016 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Battle local configuration file.
+//=========================================================================
+
+debug: 0
+SERVER_USES_VAULT: 0
diff --git a/.tools/conf/mariadb/inter-server.conf b/.tools/conf/mariadb/inter-server.conf
new file mode 100644
index 00000000..9cd3932f
--- /dev/null
+++ b/.tools/conf/mariadb/inter-server.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Hercules Inter Server local configuration file.
+//=========================================================================
+
+inter_configuration: {
+ // See conf/common/inter-server.conf
+}
diff --git a/.tools/conf/mariadb/login-server.conf b/.tools/conf/mariadb/login-server.conf
new file mode 100644
index 00000000..c8f1f854
--- /dev/null
+++ b/.tools/conf/mariadb/login-server.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Login Server local configuration file.
+//=========================================================================
+
+login_configuration: {
+ // See conf/login/login-server.conf for details
+}
diff --git a/.tools/conf/mariadb/logs.conf b/.tools/conf/mariadb/logs.conf
new file mode 100644
index 00000000..47e5a665
--- /dev/null
+++ b/.tools/conf/mariadb/logs.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Hercules Log local configuration file.
+//=========================================================================
+
+map_log: {
+ // See conf/map/logs.conf for details
+}
diff --git a/.tools/conf/mariadb/map-server.conf b/.tools/conf/mariadb/map-server.conf
new file mode 100644
index 00000000..11e4356b
--- /dev/null
+++ b/.tools/conf/mariadb/map-server.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Map Server local configuration file.
+//=========================================================================
+
+map_configuration: {
+ // See conf/map/map-server.conf for details
+}
diff --git a/.tools/conf/mariadb/msg_conf.txt b/.tools/conf/mariadb/msg_conf.txt
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/.tools/conf/mariadb/msg_conf.txt
diff --git a/.tools/conf/mariadb/ports.conf b/.tools/conf/mariadb/ports.conf
new file mode 100644
index 00000000..7d5481e3
--- /dev/null
+++ b/.tools/conf/mariadb/ports.conf
@@ -0,0 +1,8 @@
+// Login server port
+login_port: 6901
+
+// Character server port
+char_port: 6122
+
+// Map server port
+map_port: 5122
diff --git a/.tools/conf/mariadb/script.conf b/.tools/conf/mariadb/script.conf
new file mode 100644
index 00000000..042644ff
--- /dev/null
+++ b/.tools/conf/mariadb/script.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Hercules Script local configuration file.
+//=========================================================================
+
+script_configuration: {
+ // See conf/map/script.conf for details
+}
diff --git a/.tools/conf/mariadb/socket.conf b/.tools/conf/mariadb/socket.conf
new file mode 100644
index 00000000..57806f21
--- /dev/null
+++ b/.tools/conf/mariadb/socket.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Hercules Sockets local configuration file
+//=========================================================================
+
+socket_configuration: {
+ // See conf/common/socket.conf for details.
+}
diff --git a/.tools/conf/mariadb/sql_connection.conf b/.tools/conf/mariadb/sql_connection.conf
new file mode 100644
index 00000000..1e0e559f
--- /dev/null
+++ b/.tools/conf/mariadb/sql_connection.conf
@@ -0,0 +1,52 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2016 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= SQL connection configuration file.
+//=========================================================================
+// This file affects how ALL server sql connections work, unless explictly
+// defined so in the server configuration file (See
+// doc/global_configuration.txt for more information).
+//=========================================================================
+
+sql_connection: {
+ // [INTER] You can specify the codepage to use in your mySQL tables here.
+ // (Note that this feature requires MySQL 4.1+)
+ //default_codepage: ""
+
+ // [LOGIN] Is `userid` in account_db case sensitive?
+ //case_sensitive: false
+
+ // For IPs, ideally under linux, you want to use localhost instead of 127.0.0.1.
+ // Under windows, you want to use 127.0.0.1. If you see a message like
+ // "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
+ // and you have localhost, switch it to 127.0.0.1
+ db_hostname: "mariadb"
+ db_port: 3306
+ db_username: "evol"
+ db_password: "evol"
+ db_database: "evol"
+ //codepage:""
+}
diff --git a/.tools/conf/mysql/battle.conf b/.tools/conf/mysql/battle.conf
new file mode 100644
index 00000000..ff05022c
--- /dev/null
+++ b/.tools/conf/mysql/battle.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Battle local configuration file.
+//=========================================================================
+
+battle_configuration: {
+ // See conf/map/battle.conf for details
+}
diff --git a/.tools/conf/mysql/char-server.conf b/.tools/conf/mysql/char-server.conf
new file mode 100644
index 00000000..448b8d18
--- /dev/null
+++ b/.tools/conf/mysql/char-server.conf
@@ -0,0 +1,31 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Character Server local configuration file.
+//=========================================================================
+
+min_char_class: 0
+max_char_class: 6
diff --git a/.tools/conf/mysql/constants.conf b/.tools/conf/mysql/constants.conf
new file mode 100644
index 00000000..7d269595
--- /dev/null
+++ b/.tools/conf/mysql/constants.conf
@@ -0,0 +1,31 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2016 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Battle local configuration file.
+//=========================================================================
+
+debug: 0
+SERVER_USES_VAULT: 0
diff --git a/.tools/conf/mysql/inter-server.conf b/.tools/conf/mysql/inter-server.conf
new file mode 100644
index 00000000..9cd3932f
--- /dev/null
+++ b/.tools/conf/mysql/inter-server.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Hercules Inter Server local configuration file.
+//=========================================================================
+
+inter_configuration: {
+ // See conf/common/inter-server.conf
+}
diff --git a/.tools/conf/mysql/login-server.conf b/.tools/conf/mysql/login-server.conf
new file mode 100644
index 00000000..c8f1f854
--- /dev/null
+++ b/.tools/conf/mysql/login-server.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Login Server local configuration file.
+//=========================================================================
+
+login_configuration: {
+ // See conf/login/login-server.conf for details
+}
diff --git a/.tools/conf/mysql/logs.conf b/.tools/conf/mysql/logs.conf
new file mode 100644
index 00000000..47e5a665
--- /dev/null
+++ b/.tools/conf/mysql/logs.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Hercules Log local configuration file.
+//=========================================================================
+
+map_log: {
+ // See conf/map/logs.conf for details
+}
diff --git a/.tools/conf/mysql/map-server.conf b/.tools/conf/mysql/map-server.conf
new file mode 100644
index 00000000..11e4356b
--- /dev/null
+++ b/.tools/conf/mysql/map-server.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Map Server local configuration file.
+//=========================================================================
+
+map_configuration: {
+ // See conf/map/map-server.conf for details
+}
diff --git a/.tools/conf/mysql/msg_conf.txt b/.tools/conf/mysql/msg_conf.txt
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/.tools/conf/mysql/msg_conf.txt
diff --git a/.tools/conf/mysql/ports.conf b/.tools/conf/mysql/ports.conf
new file mode 100644
index 00000000..7d5481e3
--- /dev/null
+++ b/.tools/conf/mysql/ports.conf
@@ -0,0 +1,8 @@
+// Login server port
+login_port: 6901
+
+// Character server port
+char_port: 6122
+
+// Map server port
+map_port: 5122
diff --git a/.tools/conf/mysql/script.conf b/.tools/conf/mysql/script.conf
new file mode 100644
index 00000000..042644ff
--- /dev/null
+++ b/.tools/conf/mysql/script.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Hercules Script local configuration file.
+//=========================================================================
+
+script_configuration: {
+ // See conf/map/script.conf for details
+}
diff --git a/.tools/conf/mysql/socket.conf b/.tools/conf/mysql/socket.conf
new file mode 100644
index 00000000..57806f21
--- /dev/null
+++ b/.tools/conf/mysql/socket.conf
@@ -0,0 +1,32 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2019 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= Hercules Sockets local configuration file
+//=========================================================================
+
+socket_configuration: {
+ // See conf/common/socket.conf for details.
+}
diff --git a/.tools/conf/mysql/sql_connection.conf b/.tools/conf/mysql/sql_connection.conf
new file mode 100644
index 00000000..b469dbf0
--- /dev/null
+++ b/.tools/conf/mysql/sql_connection.conf
@@ -0,0 +1,52 @@
+//================= Hercules Configuration ================================
+//= _ _ _
+//= | | | | | |
+//= | |_| | ___ _ __ ___ _ _| | ___ ___
+//= | _ |/ _ \ '__/ __| | | | |/ _ \/ __|
+//= | | | | __/ | | (__| |_| | | __/\__ \
+//= \_| |_/\___|_| \___|\__,_|_|\___||___/
+//================= License ===============================================
+//= This file is part of Hercules.
+//= http://herc.ws - http://github.com/HerculesWS/Hercules
+//=
+//= Copyright (C) 2014-2016 Hercules Dev Team
+//=
+//= Hercules is free software: you can redistribute it and/or modify
+//= it under the terms of the GNU General Public License as published by
+//= the Free Software Foundation, either version 3 of the License, or
+//= (at your option) any later version.
+//=
+//= This program is distributed in the hope that it will be useful,
+//= but WITHOUT ANY WARRANTY; without even the implied warranty of
+//= MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//= GNU General Public License for more details.
+//=
+//= You should have received a copy of the GNU General Public License
+//= along with this program. If not, see <http://www.gnu.org/licenses/>.
+//=========================================================================
+//= SQL connection configuration file.
+//=========================================================================
+// This file affects how ALL server sql connections work, unless explictly
+// defined so in the server configuration file (See
+// doc/global_configuration.txt for more information).
+//=========================================================================
+
+sql_connection: {
+ // [INTER] You can specify the codepage to use in your mySQL tables here.
+ // (Note that this feature requires MySQL 4.1+)
+ //default_codepage: ""
+
+ // [LOGIN] Is `userid` in account_db case sensitive?
+ //case_sensitive: false
+
+ // For IPs, ideally under linux, you want to use localhost instead of 127.0.0.1.
+ // Under windows, you want to use 127.0.0.1. If you see a message like
+ // "Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)"
+ // and you have localhost, switch it to 127.0.0.1
+ db_hostname: "mysql"
+ db_port: 3306
+ db_username: "evol"
+ db_password: "evol"
+ db_database: "evol"
+ //codepage:""
+}
diff --git a/.tools/jobs/build.sh b/.tools/jobs/build.sh
new file mode 100755
index 00000000..8b57f711
--- /dev/null
+++ b/.tools/jobs/build.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+export LOGFILE=gcc6.log
+
+source ./.tools/scripts/init.sh
+
+pwd
+cd ..
+
+build_init
+
+cd server-code
+check_error $?
+
+make_server "$1" "$2"
diff --git a/.tools/jobs/cloneall.sh b/.tools/jobs/cloneall.sh
new file mode 100755
index 00000000..79bb8d03
--- /dev/null
+++ b/.tools/jobs/cloneall.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+source ./.tools/scripts/init.sh
+
+do_init
diff --git a/.tools/jobs/clonedata.sh b/.tools/jobs/clonedata.sh
new file mode 100755
index 00000000..95fa77a5
--- /dev/null
+++ b/.tools/jobs/clonedata.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+source ./.tools/scripts/init.sh
+
+do_init_data
diff --git a/.tools/jobs/initdb.sh b/.tools/jobs/initdb.sh
new file mode 100755
index 00000000..d6c2480f
--- /dev/null
+++ b/.tools/jobs/initdb.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+source ./.tools/scripts/init.sh
+
+cd ../server-data
+
+export host=$1
+cd sql-files
+
+export CMD="mysql --force -u root -proot --host=${host}"
+check_error $?
+echo $CMD <./initremote.sql
+$CMD <./initremote.sql
+check_error $?
+
+export CMD="mysql -u evol -pevol --host=${host} evol"
+echo Creating tables...
+echo $CMD <main.sql
+$CMD <main.sql
+check_error $?
+echo $CMD <logs.sql
+$CMD <logs.sql
+check_error $?
diff --git a/.tools/jobs/install.sh b/.tools/jobs/install.sh
new file mode 100755
index 00000000..dd762e1a
--- /dev/null
+++ b/.tools/jobs/install.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+source ./.tools/scripts/init.sh
+
+update_repos
+aptget_update
+
+aptget_install $*
+
+do_init_data
diff --git a/.tools/jobs/newlines.sh b/.tools/jobs/newlines.sh
new file mode 100755
index 00000000..23309f70
--- /dev/null
+++ b/.tools/jobs/newlines.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+find -H . -type f -name "*.txt" -o -name "*.conf" -exec dos2unix {} \;
+
+export RES=$(git diff --name-only)
+if [[ -n "${RES}" ]]; then
+ echo "Wrong new lines detected in files:"
+ git diff --name-only
+ exit 1
+fi
diff --git a/.tools/jobs/runserver.sh b/.tools/jobs/runserver.sh
new file mode 100755
index 00000000..6bff48ab
--- /dev/null
+++ b/.tools/jobs/runserver.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+source ./.tools/scripts/init.sh
+
+function run_server {
+ echo "running: $1 --run-once $2"
+ $1 --run-once $2 2>runlog.txt
+ export errcode=$?
+ export teststr=$(cat runlog.txt)
+ if [[ -n "${teststr}" ]]; then
+ echo "Errors found in running server $1."
+ cat runlog.txt
+ echo "Errors found in running server $1."
+ exit 1
+ else
+ echo "No errors found for server $1."
+ fi
+ if [ ${errcode} -ne 0 ]; then
+ echo "server $1 terminated with exit code ${errcode}"
+ echo "Test failed"
+ exit 1
+ fi
+}
+
+do_init_tools
+init_configs $1
+
+cd server-data
+pwd
+ls -la
+
+run_server ./login-server
+run_server ./char-server
+
+ARGS="--load-script npc/dev/test.txt "
+ARGS="--load-plugin script_mapquit $ARGS --load-script npc/dev/ci_test.txt"
+
+run_server ./map-server "$ARGS"
diff --git a/.tools/jobs/runservervalgrind.sh b/.tools/jobs/runservervalgrind.sh
new file mode 100755
index 00000000..6442b091
--- /dev/null
+++ b/.tools/jobs/runservervalgrind.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+source ./.tools/scripts/init.sh
+
+function run_server {
+ echo "running: $1 --run-once $2"
+ valgrind -q --read-var-info=yes --track-origins=yes --malloc-fill=11 --free-fill=55 --show-reachable=yes --leak-check=full --leak-resolution=high --partial-loads-ok=yes --error-limit=no $1 --run-once $2 2>runlog.txt
+ export errcode=$?
+ export teststr=$(grep "invalid" runlog.txt)
+ cat runlog.txt
+ if [[ -n "${teststr}" ]]; then
+ echo "Errors found in running server $1."
+ exit 1
+ else
+ echo "No errors found for server $1."
+ fi
+ if [ ${errcode} -ne 0 ]; then
+ echo "server $1 terminated with exit code ${errcode}"
+ echo "Test failed"
+ exit 1
+ fi
+}
+
+do_init_tools
+init_configs $1
+
+cd server-data
+pwd
+ls -la
+
+run_server ./login-server
+run_server ./char-server
+
+ARGS="--load-script npc/dev/test.txt "
+ARGS="--load-plugin script_mapquit $ARGS --load-script npc/dev/ci_test.txt"
+
+run_server ./map-server "$ARGS"
diff --git a/.tools/jobs/spaces.sh b/.tools/jobs/spaces.sh
new file mode 100755
index 00000000..b0f485db
--- /dev/null
+++ b/.tools/jobs/spaces.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+find -H . -type f -name "*.txt" -exec sed -i 's/[[:blank:]]*$//' {} \;
+
+export RES=$(git diff --name-only)
+if [[ -n "${RES}" ]]; then
+ echo "Extra spaces before new lines detected in files:"
+ git diff --name-only
+ exit 1
+fi
diff --git a/.tools/npc/motd-debug-text.txt b/.tools/npc/motd-debug-text.txt
new file mode 100644
index 00000000..a57c9a2a
--- /dev/null
+++ b/.tools/npc/motd-debug-text.txt
@@ -0,0 +1,4 @@
+function script MOTD_debug_text {
+ setarray $@Debug_Messages$[0], "";
+ return;
+}
diff --git a/.tools/scripts/init.sh b/.tools/scripts/init.sh
new file mode 100755
index 00000000..9bac358e
--- /dev/null
+++ b/.tools/scripts/init.sh
@@ -0,0 +1,217 @@
+#!/bin/bash
+
+mkdir logs
+
+export dir=$(pwd)
+export ERRFILE=${dir}/logs/${LOGFILE}
+
+cat /etc/os-release
+
+rm ${ERRFILE}
+
+function check_error {
+ if [ "$1" != 0 ]; then
+ echo "Error $1"
+ exit $1
+ fi
+}
+
+function update_repos {
+ if [ "$CI_SERVER" == "" ];
+ then
+ return
+ fi
+
+ export DATA=$(cat /etc/resolv.conf|grep "nameserver 1.10.100.101")
+ if [ "$DATA" != "" ];
+ then
+ echo "Detected local runner"
+ sed -i 's!http://httpredir.debian.org/debian!http://1.10.100.103/debian!' /etc/apt/sources.list
+ else
+ echo "Detected non local runner"
+ fi
+}
+
+function gitclone1 {
+ echo git clone $2 $3
+ git clone $2 $3
+ if [ "$?" != 0 ]; then
+ echo git clone $1 $3
+ git clone $1 $3
+ return $?
+ fi
+ return $?
+}
+
+function gitclone {
+ export name1=$1/$2
+ export name2=${CI_BUILD_REPO##*@}
+ export name2=https://${name2%/*}/$2
+
+ gitclone1 "$name1" "$name2" $3
+ if [ "$?" != 0 ]; then
+ sleep 1s
+ gitclone1 "$name1" "$name2" $3
+ if [ "$?" != 0 ]; then
+ sleep 3s
+ gitclone1 "$name1" "$name2" $3
+ if [ "$?" != 0 ]; then
+ sleep 5s
+ gitclone1 "$name1" "$name2" $3
+ fi
+ fi
+ fi
+ check_error $?
+}
+
+function update_repos {
+ if [ "$CI_SERVER" == "" ];
+ then
+ return
+ fi
+
+ export DATA=$(cat /etc/resolv.conf|grep "nameserver 1.10.100.101")
+ if [ "$DATA" != "" ];
+ then
+ echo "Detected local runner"
+ sed -i 's!http://httpredir.debian.org/debian!http://1.10.100.103/debian!' /etc/apt/sources.list
+ else
+ echo "Detected non local runner"
+ fi
+}
+
+function aptget_update {
+ update_repos
+ echo apt-get update
+ apt-get update
+ if [ "$?" != 0 ]; then
+ sleep 1s
+ apt-get update
+ if [ "$?" != 0 ]; then
+ sleep 1s
+ apt-get update
+ fi
+ fi
+ check_error $?
+}
+
+function aptget_install {
+ echo apt-get -y install $*
+ apt-get -y install $*
+ if [ "$?" != 0 ]; then
+ sleep 1s
+ apt-get -y install $*
+ if [ "$?" != 0 ]; then
+ sleep 2s
+ apt-get -y install $*
+ fi
+ fi
+ check_error $?
+}
+
+function make_server {
+ ls -la ../server-data
+ ls -la ../server-data/plugins
+ echo source src/evol/tools/vars.sh
+ source ./src/evol/tools/vars.sh
+ check_error $?
+ export CPPFLAGS="$CPPFLAGS -DI_AM_AWARE_OF_THE_RISK_AND_STILL_WANT_TO_RUN_HERCULES_AS_ROOT"
+ echo "autoreconf -i"
+ autoreconf -i
+ check_error $?
+ echo ./configure $1 CPPFLAGS=\"${CPPFLAGS}${HERCCPPFLAGS}\"
+ ./configure $1 CPPFLAGS="$CPPFLAGS$HERCCPPFLAGS"
+ export err="$?"
+ if [ "$err" != 0 ]; then
+ echo "Error $err"
+ echo cat config.log
+ cat config.log
+ exit $err
+ fi
+ echo "make -j2"
+ make -j2
+ check_error $?
+ echo "make -j2 plugin.script_mapquit"
+ make -j2 plugin.script_mapquit
+ check_error $?
+ make install
+ check_error $?
+
+ cd src/evol
+ echo "autoreconf -i"
+ mkdir m4
+ autoreconf -i
+ check_error $?
+ mkdir build
+ cd build
+ echo ../configure $2 CPPFLAGS=\"${VARS}\"
+ ../configure $2 CPPFLAGS="${VARS}"
+ check_error $?
+ echo "make -j2 V=0"
+ make -j2 V=0
+ check_error $?
+ cd ../../../..
+ ls -la server-data/plugins
+}
+
+function do_init_data {
+ mkdir shared
+ cd ..
+ rm -rf server-data
+ cp -r ${CI_PROJECT_NAME:=serverdata} server-data
+ ls -la server-data
+ check_error $?
+}
+
+function do_init_tools {
+ cd ..
+ rm -rf tools
+ gitclone https://gitlab.com/evol evol-tools.git tools
+}
+
+function do_init {
+ do_init_data
+ rm -rf server-code
+ gitclone https://gitlab.com/evol hercules.git server-code
+ check_error $?
+ cd server-code/src
+ check_error $?
+ gitclone https://gitlab.com/evol evol-hercules.git evol
+ check_error $?
+ cd ../..
+ check_error $?
+ mkdir -p server-data/plugins
+}
+
+function build_init {
+ if [ "$CI_SERVER" == "" ];
+ then
+ return
+ fi
+ mkdir -p /local/bin
+ echo "#!/bin/bash" > /local/bin/id
+ echo "echo 1000" >> /local/bin/id
+ export PATH="/local/bin:$PATH"
+ chmod +x /local/bin/id
+ echo "fake id check"
+ id
+
+ cd server-code/src/evol
+ source tools/vars.sh
+ check_error $?
+ cd ../../..
+ check_error $?
+ echo $CC --version
+ $CC --version
+ check_error $?
+}
+
+function init_configs {
+ cd tools/localserver
+ ./installconfigs.sh
+ cd ../..
+ cp server-data/.tools/conf/$1/* server-data/conf/import/
+ cp server-data/.tools/npc/motd-* server-data/npc/commands/
+ ls -la server-data/conf/import
+ cat server-data/conf/import/inter_conf.txt
+}