开发者

Vista batch or vbs? read,write txt files, compare strings, run svn cmds

开发者 https://www.devze.com 2023-01-04 05:17 出处:网络
Would like to create a script that runs as a scheduled task in Vista to perodically check the revision number of an SVN repository. Compare the svn revision number

Would like to create a script that runs as a scheduled task in Vista to perodically check the revision number of an SVN repository. Compare the svn revision number to a revision number in a local text file. When the revision number changes do stuff.

Overview: Get the current svn revision number. Store it in a text file. Read a one line text file into an environment variable, trim it to 4digits. svn revision numbers are in the following format: xxxxM

Read one line from a local text file into an 开发者_JS百科environment variable, trim it. Local revision numbers are stored in a text file in the following format:

line1 ... bla.

line2 ... bla, bla.

"hostname text Rev[xxxx]".

near last line.

last line.

compare the revision numbers. If they do not match, run svn update, rewrite the local text file with the current svn revision number.

started on a batch file and began to wonder if this would be better suited to vbs.


Whether VBScript is a better fit here depends on what you're comfortable with, who needs to maintain that script, what other requirements might be there and perhaps even more things.

From what I see what you describe is fairly easy with both a batch file and a VB Script. The only problem you're going to have is dependency on a particular language of the Subversion output.

0

精彩评论

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