summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2020-10-08 22:51:58 +0200
committeremkael <emkael@tlen.pl>2020-10-08 22:51:58 +0200
commit99f3516002a145ffa678dd3f7902453d1eca3963 (patch)
tree6ab8bf4e0afe1d8b3d26a1732d825cc0006b55f0
parentbdff54b0ccbee5753e3756bb2a592813aeab7671 (diff)
Detecting tournament language on dump load
-rwxr-xr-xdumps/load-dumps.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/dumps/load-dumps.sh b/dumps/load-dumps.sh
index 7695a40..28370e6 100755
--- a/dumps/load-dumps.sh
+++ b/dumps/load-dumps.sh
@@ -3,11 +3,11 @@ pushd $(dirname $0) >> /dev/null
cat .mapping | while read DB DUMP
do
grep -v 'CREATE DATABASE' $DUMP | grep -vi '^Use ' | mysql ${LIGA_MYSQL_CONNECTION_OPTS} $DB
- if [ "$DB" != "dmp202021_e" ]
+ if [[ $(mysql ${LIGA_MYSQL_CONNECTION_OPTS} $DB -N -e "SELECT language FROM params;") == *"english.language"* ]]
then
- <logoh.sql mysql ${LIGA_MYSQL_CONNECTION_OPTS} $DB
- else
<logoh.en.sql mysql ${LIGA_MYSQL_CONNECTION_OPTS} $DB
+ else
+ <logoh.sql mysql ${LIGA_MYSQL_CONNECTION_OPTS} $DB
fi
cat .queries | while read -r QUERY
do