开发者

Ant database rebuild script, avoiding interactive prompting

I'm writing an ant script to rebuild our database i.e. dropping everything and rebuilding from scratch. The problem our DBA adds a Y/N prompt before executing the rest of the script, and therefore we can't call this from an automated build process.

Does anyone have any suggestions to ci开发者_如何学JAVArcumvent the Y/N prompt? Obviously we could create separate scripts, one for the DBA's and one for the automated build - but this requires maintaining both. We're running on Windows so it's not as easy as using sed to strip out the prompt...but I'm thinking something along those lines.

Not sure if that's clear enough but hope you can help.

Cheers.


Maybe Expect would help?

http://en.wikipedia.org/wiki/Expect


Seems like the DBA should be thinking more automation and make the script not pop up a gui yes no dialog. How about they make the yes no a command line option. I think you can jump through hoops to get past this, but push the work on the part of the process that needs to be reworked.

Take a look at AutoIT

This will let you possibly find the dialog and the yes button and automate the clicking. But I still say the DBA should move away from the GUI for this yes no input.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜