diff --git a/pandamonium-theorem-prover/persistence/build.gradle b/pandamonium-theorem-prover/persistence/build.gradle index 9b8ac60..c52d061 100644 --- a/pandamonium-theorem-prover/persistence/build.gradle +++ b/pandamonium-theorem-prover/persistence/build.gradle @@ -1,3 +1,5 @@ +import org.gradle.internal.os.OperatingSystem; + plugins { id 'java' } @@ -35,6 +37,11 @@ dependencies { } task loadDb(type: Exec, group: 'Verification', description: 'Reloads the local database.') { - workingDir "./scripts/mysql" - commandLine './loaddb.sh' + if (OperatingSystem.current().isLinux() || OperatingSystem.current().isMacOsX()) { + workingDir "./scripts/mysql" + commandLine './loaddb.sh' + } else { + workingDir "./scripts/mysql" + commandLine 'loaddb.bat' + } } diff --git a/pandamonium-theorem-prover/persistence/scripts/mysql/loaddb.bat b/pandamonium-theorem-prover/persistence/scripts/mysql/loaddb.bat new file mode 100644 index 0000000..37c4da6 --- /dev/null +++ b/pandamonium-theorem-prover/persistence/scripts/mysql/loaddb.bat @@ -0,0 +1,5 @@ +SET MYSQL_PWD=secret +FOR /R %%s IN (.\*.sql) do ( + echo **** %%s **** + echo mysql --batch --quick --raw --line-numbers --force --user=panda < %%s +)