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

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 ..