Recevies svn status from stdin and defines working revision number var

1
2
3
4
5
6
// Recevies svn status from stdin and defines working revision number
var status = WScript.StdIn.ReadLine();
status = status.match("[ADMCXI]|\\d+");
var fso = WScript.CreateObject("Scripting.FileSystemObject");
var out = fso.CreateTextFile("version.nsh", true);
out.WriteLine("!define REV \"rev" + status + "\"");