Ticket #9: buildme.patch
| File buildme.patch, 2.1 kB (added by larsivi, 1 year ago) |
|---|
-
buildme.d
old new 34 34 //============================================================================== 35 35 version(Tango) 36 36 { 37 static assert(0, "Tango support for the build script is currently incomplete.");37 // static assert(0, "Tango support for the build script is currently incomplete."); 38 38 private 39 39 { 40 40 import tango.text.Ascii; … … 45 45 import tango.core.Version; 46 46 import tango.stdc.stringz; 47 47 import tango.stdc.stdio; 48 import tango.io.FilePath; 49 import tango.io.Stdout; 50 import tango.sys.Environment; 48 51 } 49 52 } 50 53 else … … 76 79 { 77 80 version = NixConst; 78 81 } 82 else version(Posix) 83 { 84 version = NixConst; 85 } 79 86 80 87 version(NixConst) 81 88 { … … 116 123 void main(char[][] args) 117 124 { 118 125 // check if the first arg is the cleanlib argument 119 if(args.length == 2 && (cmpStr(toLowerStr(args[1] ), "cleanlib") == 0))126 if(args.length == 2 && (cmpStr(toLowerStr(args[1].dup), "cleanlib") == 0)) 120 127 { 121 128 cleanLib(); 122 129 return; … … 128 135 // parse the command line 129 136 foreach(c; args) 130 137 { 131 char[] lower = toLowerStr(c );138 char[] lower = toLowerStr(c.dup); 132 139 switch(lower) 133 140 { 134 141 case "bud": … … 197 204 // cycle through every Derelict directory to find buildable packages 198 205 version(Tango) 199 206 { 207 scope dir = new FilePath("."); 208 foreach(c; dir.toList) { 209 scope path = new FilePath(c); 210 if (path.isFolder && c[0] != '.') 211 processPackage(c); 212 } 213 200 214 } 201 215 else 202 216 { … … 424 438 { 425 439 version(Tango) 426 440 { 427 auto p = new Process(cmd, null);441 auto p = new Process(cmd, Environment.get); 428 442 p.execute(); 443 Stdout.stream.copy(p.stdout); 429 444 auto r = p.wait(); 430 445 return r.status; 431 446 }
