我希望在我的build.gradle脚本中添加一个包含多个Windows和Linux脚本的目录路径。目前,我定义的任务如下,并且它可以正常工作。
但我希望将这个任务定义为-
这些脚本还使用了My_CONF\pgdb目录中的另一个脚本。
task initdb(type: Exec){
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine 'cmd', '/c', 'My_CONF\\pgdb\\initdb.cmd'
} else {
commandLine 'My_CONF/pgdb/initdb.sh'
}
}
但我希望将这个任务定义为-
task initdb(type: Exec){
if (System.getProperty('os.name').toLowerCase().contains('windows')) {
commandLine 'cmd', '/c', 'initdb.cmd'
} else {
commandLine 'initdb.sh'
}
}
这些脚本还使用了My_CONF\pgdb目录中的另一个脚本。