mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-22 12:47:45 +00:00
14 lines
359 B
Bash
14 lines
359 B
Bash
#!/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
|
|
#mysql sapphire -u root < update.sql -f
|
|
echo 'todo: test update sql'
|
|
cd ..
|