Contrib: Fix the check_update scripts after the recent organization changes

* Fixes the travis build
* Ref 8778829a98

(cherry picked from commit e3a583646e)
This commit is contained in:
Naios
2016-04-17 17:14:29 +02:00
parent 34f72c9f6d
commit c333d0f6de
2 changed files with 6 additions and 5 deletions

View File

@@ -25,15 +25,15 @@ install:
- cd bin
- cmake ../ -DWITH_WARNINGS=1 -DWITH_COREDEBUG=0 -DUSE_COREPCH=1 -DUSE_SCRIPTPCH=1 -DTOOLS=1 -DSCRIPTS="dynamic" -DSERVERS=1 -DNOJEM=1 -DWITH_DYNAMIC_LINKING=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror" -DCMAKE_INSTALL_PREFIX=check_install
- cd ..
- sudo chmod +x contrib/check_updates.sh
- chmod +x contrib/check_updates.sh
script:
- $CXX --version
- mysql -uroot < sql/create/create_mysql.sql
- mysql -utrinity -ptrinity auth < sql/base/auth_database.sql
- ./contrib/check_updates.sh auth auth
- ./contrib/check_updates.sh auth 3.3.5 auth
- mysql -utrinity -ptrinity characters < sql/base/characters_database.sql
- ./contrib/check_updates.sh characters characters
- ./contrib/check_updates.sh characters 3.3.5 characters
- mysql -utrinity -ptrinity world < sql/base/dev/world_database.sql
- cat sql/updates/world/*.sql | mysql -utrinity -ptrinity world
- mysql -uroot < sql/create/drop_mysql.sql

View File

@@ -1,6 +1,7 @@
#!/bin/sh
name=$1
database=$2
branch=$2
database=$3
echo "Database Updater check script:"
echo " Checking database '${name}' for missing filenames in tables..."
@@ -9,7 +10,7 @@ echo
# Select all entries which are in the updates table
entries=$(mysql -uroot ${database} -e "SELECT name FROM updates" | grep ".sql")
cd sql/updates/${name}
cd sql/updates/${name}/${branch}
error=0
updates=0