5

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!

1 Answer 1

3

I just fixed the problem. Instead of :

commandLine './jooq/myJooqGeneratorDb.sh'

is

commandLine 'sh' , './jooq/myJooqGeneratorDb.sh'
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.