summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-11-14 18:36:31 +0300
committerAndrei Karas <akaras@inbox.ru>2015-11-14 18:36:31 +0300
commitabc5b7dd12cb6ee1796280af1d96bb70c57a901e (patch)
treee1ce794058cd35f56c1517ded7fb195e5dd5ca4d
parentef9a68cc014c8a32ec7dd466a69978d77c45add3 (diff)
downloadall-abc5b7dd12cb6ee1796280af1d96bb70c57a901e.tar.gz
all-abc5b7dd12cb6ee1796280af1d96bb70c57a901e.tar.bz2
all-abc5b7dd12cb6ee1796280af1d96bb70c57a901e.tar.xz
all-abc5b7dd12cb6ee1796280af1d96bb70c57a901e.zip
Fix checking db version.
-rwxr-xr-xstatus.sh10
1 files changed, 8 insertions, 2 deletions
diff --git a/status.sh b/status.sh
index 5ee5bad..ed7190d 100755
--- a/status.sh
+++ b/status.sh
@@ -2,15 +2,21 @@
export LANG=C
+function reportdb {
+ echo "database"
+ echo -e " \e[1;31mPlease upgrade database. See instuctions in http://wiki.evolonline.org/guidelines/updating#update_database\e[0m"
+}
+
function dbinfo {
export VER=$(cat tools/localserver/versions/sqlver 2>/dev/null)
if [[ -n "${VER}" ]]; then
if [ "${VER}" -lt "2" ]; then
- echo "database"
- echo -e "\e[1;31mPlease upgrade database. See instuctions in http://wiki.evolonline.org/guidelines/updating#update_database\e[0m"
+ reportdb
fi
+ return
fi
+ reportdb
}
function status {