I have this command
find path/tools/ \( -name '*.sh' -o -name '*.exe' -o ! -name "*.*" \) -exec chmod +x {} \;
How can I define it in my Gradle exec task?
task xPermTools (type: Exec){
workingDir '../'
commandLine "find", "path/tools/", "\( -name *.sh -o -name '*.exe' -o ! -name "*.*" \)", "-exec", "chmod", "+x", "{}", "\;"
}
Do I need to give it as a list? The above piece of code returns an error such as
build file '/home/li_user/path_root/build.gradle': 422: unexpected char: '\' @ line 422, column 44.
Additionally, how do I convert this to a groovy command? I want to set permissions for shell scripts from groovy.