问题
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