chore(db_assembler): Changed var name (#1091)

- Added a missing "s" to the update suffix because it must match exactly the name of the updates/ directory (we have base, custom and updates)
- Also changed var name in config.sh.dist (edit your config.sh if you use it)
- Removed trailing spaces
This commit is contained in:
Barbz
2019-01-22 22:43:30 +01:00
committed by GitHub
parent 71e0ad005b
commit b41fd95874
2 changed files with 22 additions and 20 deletions

View File

@@ -125,7 +125,7 @@ function dbasm_assemble() {
v="$name[@]" v="$name[@]"
base=("${!v}") base=("${!v}")
name="DB_"$uc"_UPDATE_PATHS" name="DB_"$uc"_UPDATES_PATHS"
v="$name[@]" v="$name[@]"
updates=("${!v}") updates=("${!v}")
@@ -135,7 +135,7 @@ function dbasm_assemble() {
suffix_base="_base" suffix_base="_base"
suffix_upd="_update" suffix_upd="_updates"
suffix_custom="_custom" suffix_custom="_custom"
curTime=`date +%Y_%m_%d_%H_%M_%S` curTime=`date +%Y_%m_%d_%H_%M_%S`
@@ -299,10 +299,12 @@ function dbasm_db_import() {
export MYSQL_PWD=$MYSQL_PASS export MYSQL_PWD=$MYSQL_PASS
# TODO: remove this line after we squash our DB updates # TODO: remove this line after we squash our DB updates
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" -e "SET GLOBAL max_allowed_packet=128*1024*1024;" "$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" -e "SET GLOBAL max_allowed_packet=128*1024*1024;"
"$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" --default-character-set=utf8 "$dbname" < "${OUTPUT_FOLDER}${database}_${type}.sql" "$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" --default-character-set=utf8 "$dbname" < "${OUTPUT_FOLDER}${database}_${type}.sql"
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
err=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" "$dbname" 2>&1 ) err=$("$DB_MYSQL_EXEC" -h "$MYSQL_HOST" -u "$MYSQL_USER" "$dbname" 2>&1 )
if [[ "$err" == *"Access denied"* ]]; then if [[ "$err" == *"Access denied"* ]]; then
@@ -360,7 +362,7 @@ function dbasm_import() {
if [ $with_updates = true ]; then if [ $with_updates = true ]; then
for db in ${DATABASES[@]} for db in ${DATABASES[@]}
do do
dbasm_db_import "$db" "update" dbasm_db_import "$db" "updates"
done done
fi fi

View File

@@ -99,17 +99,17 @@ DB_WORLD_PATHS=(
) )
# UPDATES # UPDATES
DB_CHARACTERS_UPDATE_PATHS=( DB_CHARACTERS_UPDATES_PATHS=(
$SRCPATH"/data/sql/updates/db_characters/" $SRCPATH"/data/sql/updates/db_characters/"
$SRCPATH"/data/sql/updates/pending_db_characters/" $SRCPATH"/data/sql/updates/pending_db_characters/"
) )
DB_AUTH_UPDATE_PATHS=( DB_AUTH_UPDATES_PATHS=(
$SRCPATH"/data/sql/updates/db_auth/" $SRCPATH"/data/sql/updates/db_auth/"
$SRCPATH"/data/sql/updates/pending_db_auth/" $SRCPATH"/data/sql/updates/pending_db_auth/"
) )
DB_WORLD_UPDATE_PATHS=( DB_WORLD_UPDATES_PATHS=(
$SRCPATH"/data/sql/updates/db_world/" $SRCPATH"/data/sql/updates/db_world/"
$SRCPATH"/data/sql/updates/pending_db_world/" $SRCPATH"/data/sql/updates/pending_db_world/"
) )