Merge pull request #10 from atusa17/PAN-6-windows-compatibility
PAN-6 added a Windows batch file to load the DB on Windows systems.
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
import org.gradle.internal.os.OperatingSystem;
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'java'
|
id 'java'
|
||||||
}
|
}
|
||||||
@@ -28,6 +30,11 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
task loadDb(type: Exec, group: 'Verification', description: 'Reloads the local database.') {
|
task loadDb(type: Exec, group: 'Verification', description: 'Reloads the local database.') {
|
||||||
workingDir "./scripts/mysql"
|
if (OperatingSystem.current().isLinux() || OperatingSystem.current().isMacOsX()) {
|
||||||
commandLine './loaddb.sh'
|
workingDir "./scripts/mysql"
|
||||||
|
commandLine './loaddb.sh'
|
||||||
|
} else {
|
||||||
|
workingDir "./scripts/mysql"
|
||||||
|
commandLine '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
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user