1 // this script is a local start-commit hook script.
\r
5 objArgs = WScript.Arguments;
\r
6 num = objArgs.length;
\r
9 WScript.Echo("Usage: [CScript | WScript] StartCommit.js path/to/pathsfile path/to/messagefile path/to/CWD ");
\r
13 var paths = readPaths(objArgs(0));
\r
14 var message = "list of paths selected for commit:\n";
\r
16 while (i < paths.length)
\r
18 message = message + paths[i] + "\n";
\r
21 message = message + "path of message file is: " + objArgs(1) + "\n";
\r
22 message = message + "CWD is: " + objArgs(2) + "\n";
\r
24 WScript.Echo(message);
\r
28 function readPaths(path)
\r
30 var retPaths = new Array();
\r
31 var fs = new ActiveXObject("Scripting.FileSystemObject");
\r
32 if (fs.FileExists(path))
\r
34 var a = fs.OpenTextFile(path, 1, false);
\r
36 while (!a.AtEndOfStream)
\r
38 var line = a.ReadLine();
\r