summaryrefslogtreecommitdiff
path: root/localserver
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-09-05 20:47:10 +0300
committerAndrei Karas <akaras@inbox.ru>2015-09-05 20:47:10 +0300
commitf3a3fd199083b5a11a71c9c159534e395bfef048 (patch)
treece6b9f26709ed1a8107fd55334b41ec7d6b256a9 /localserver
parent454ad75aaae91c0dac1d26b013c9e65c6734dda3 (diff)
downloadevol-tools-f3a3fd199083b5a11a71c9c159534e395bfef048.tar.gz
evol-tools-f3a3fd199083b5a11a71c9c159534e395bfef048.tar.bz2
evol-tools-f3a3fd199083b5a11a71c9c159534e395bfef048.tar.xz
evol-tools-f3a3fd199083b5a11a71c9c159534e395bfef048.zip
localserver: Add updatedb script
Diffstat (limited to 'localserver')
-rw-r--r--localserver/README1
-rwxr-xr-xlocalserver/updatedb.sh24
2 files changed, 25 insertions, 0 deletions
diff --git a/localserver/README b/localserver/README
index 4b00c4e..04ea81d 100644
--- a/localserver/README
+++ b/localserver/README
@@ -5,6 +5,7 @@ build.sh - build server from sources.
givegm.sh - give gm rights to first account created on server.
initdb.sh - initialize mariadb database.
installconfigs.sh - install configurations into server data directory.
+updatedb.sh - update if need sql database
See also http://wiki.evolonline.org/guidelines/installmariadb
http://wiki.evolonline.org/guidelines/localserver
diff --git a/localserver/updatedb.sh b/localserver/updatedb.sh
new file mode 100755
index 0000000..1d641c2
--- /dev/null
+++ b/localserver/updatedb.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+export VER=$(cat versions/sqlver 2>/dev/null)
+export SQLDIR="../../server-data/sql-files/"
+export CMD="mysql -u evol -pevol evol"
+
+function run {
+ echo "Running $1"
+# $CMD <$1
+}
+
+if [[ -z "${VER}" ]]; then
+ export VER="1"
+fi
+
+if [ "${VER}" -lt "2" ]; then
+ run "2015-07-02--18-14.sql"
+ run "2015-07-08--13-08.sql"
+ run "2015-08-27--20-42.sql"
+fi
+
+if [ "${VER}" -lt "2" ]; then
+ echo "2" >versions/sqlver
+fi