diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-09 15:41:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-09 15:41:30 +0300 |
commit | 5c526d2add2b086c00157595109581771bfbbd94 (patch) | |
tree | fd5cdb1e56a4ceb1bfa5f5f24934b7e9ae680674 /localserver | |
parent | 665c04b18a29eff9f866a9f8e61c251d405d16cd (diff) | |
download | evol-tools-5c526d2add2b086c00157595109581771bfbbd94.tar.gz evol-tools-5c526d2add2b086c00157595109581771bfbbd94.tar.bz2 evol-tools-5c526d2add2b086c00157595109581771bfbbd94.tar.xz evol-tools-5c526d2add2b086c00157595109581771bfbbd94.zip |
localserver: In initdb.sh script put current db version in file.
Diffstat (limited to 'localserver')
-rwxr-xr-x | localserver/initdb.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/localserver/initdb.sh b/localserver/initdb.sh index 40358e1..cd014bc 100755 --- a/localserver/initdb.sh +++ b/localserver/initdb.sh @@ -1,5 +1,8 @@ #!/bin/bash +export DIR="$(pwd)" +export VER=$(cat versions/sqlver 2>/dev/null) + cd ../../server-data/sql-files echo Creating db and user... @@ -16,3 +19,8 @@ export CMD="mysql -u evol -pevol evol" echo Creating tables... $CMD <main.sql $CMD <logs.sql + +if [[ -z "${VER}" ]]; then + mkdir ${DIR}/versions + echo "2" >${DIR}/versions/sqlver +fi |