I am trying to run a shell script that runs in MinGW32. Then I get the following error:
Caused by:
java.io.IOException: Cannot run program "./myJooqGeneratorDB.sh", (in directory "C:\Users\admin\desktop\workspace\myProject") CreateProcess error = 193, %1 is not a valid win32 application.
My build.gradle
:
task createDb(type:Exec) {
workingDir("${project.projectDir}");
commandLine './jooq/myJooqGeneratorDb.sh'
}
My myJooqGeneratorDb.sh
:
#!/bin/bash
rm build/project.db
mkdir build
sqlite3 build/project.db < res/raw/project_create.sql
Does someone know what it's wrong in my code?. Thanks in advance!
I just fixed the problem. Instead of :
commandLine './jooq/myJooqGeneratorDb.sh'
is
commandLine 'sh' , './jooq/myJooqGeneratorDb.sh'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With