2 // C# implementation of a handful of shell steps
3 // this is used to automate the buidl in Windows
10 delegate void filt (StreamReader sr, StreamWriter sw);
12 static void Filter (string inpath, string outpath, filt filter)
14 using (var ins = new StreamReader (inpath)){
15 using (var outs = new StreamWriter (outpath)){
21 static void Main (string [] args)
23 string bdir = args.Length == 0 ? "../../../mcs" : args [0];
25 if (!Directory.Exists (Path.Combine(bdir, "class"))){
26 Console.Error.WriteLine ("The directory {0} does not contain class at {1}", Path.GetFullPath (bdir), Environment.CurrentDirectory);
32 Filter (bdir + "/build/common/Consts.cs.in",
33 bdir + "/build/common/Consts.cs",
34 (i, o) => o.Write (i.ReadToEnd ().Replace ("@MONO_VERSION@", "2.5.0")));
38 Console.Error.WriteLine ("Unknonw option to prepare.exe {0}", args [1]);