1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-22 12:47:45 +00:00
sapphire/sql_import.sh

15 lines
359 B
Bash
Raw Normal View History

2017-08-11 02:48:56 +01:00
#!/bin/bash
cd sql
mysql -u root -e 'create database sapphire;'
for f in *.sql
do
[ "$f" = "update.sql" ] && continue;
echo -n "importing $f into the database..."
mysql sapphire -u root < $f && echo "Success"
CODE=$?
if [ $CODE -ne 0 ]; then exit $CODE; fi
done
2017-08-11 03:46:41 +01:00
#mysql sapphire -u root < update.sql -f
2017-08-11 02:48:56 +01:00
echo 'todo: test update sql'
cd ..