Running Cygwin commands from batch file

徘徊边缘 提交于 2020-01-16 19:19:09

问题


My project is an AndroidNDK project and requires some build commands to run from Cygwin (or a Unix environment). Is there a way to do this using TeamCity?

I tried using the commandline build step and passing in a batch file which first launches cygwin, and then performs the build commands I need. However this does not work, all it does is launch cygwin, but my unix commands do not get executed after this.


回答1:


How are you launching and running commands from cygwin?

You will have to do bash -c "command you want to run" (assuming bash.exe is on path). Just calling bash and then giving commands will just launch bash.




回答2:


I used cygwinonce. I tried doing similar you wanted to do.I wanted to start cygwin with default command. bash --login -i myBashScript.exe only when we paste myBashScript.exe in bin folder.



来源:https://stackoverflow.com/questions/7881553/running-cygwin-commands-from-batch-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!