Changeset 595
- Timestamp:
- 05/09/07 04:51:43 (1 year ago)
- Files:
-
- branches/tango/sss/main.d (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/tango/sss/main.d
r589 r595 29 29 module sss.main; 30 30 31 import std.file; 32 import std.path; 33 import std.stdio; 34 import std.string; 35 36 import std.c.stdlib; 31 import tango.io.Console; 32 import tango.io.FilePath; 33 import tango.io.FileSystem; 34 35 import tango.stdc.stdlib; 37 36 38 37 import sss.build; … … 136 135 } else if (arg == "net") { 137 136 version (DSSS_Light) { 138 writefln("The 'net' command is not supported in DSSS Light");137 Cout("The 'net' command is not supported in DSSS Light").newline; 139 138 exit(1); 140 139 } else { … … 148 147 149 148 } else { 150 writefln("Unrecognized argument: %s", arg);149 Cout("Unrecognized argument: ")(arg).newline; 151 150 exit(1); 152 151 } … … 195 194 i++; 196 195 if (i >= args.length) { 197 writefln("Argument expected after %s", arg);196 Cout("Argument expected after ")(arg).newline; 198 197 return 1; 199 198 } … … 273 272 char[] makeAbsolute(char[] path) 274 273 { 275 if (! isabs(path)) {276 return getcwd() ~ std.path.sep ~ path;274 if (!(new FilePath(path)).isAbsolute()) { 275 return FileSystem.getDirectory() ~ std.path.sep ~ path; 277 276 } 278 277 return path; … … 282 281 { 283 282 if (command == cmd_t.NONE) { 284 writefln(283 Cout( 285 284 `DSSS version ` ~ DSSS_VERSION ~ ` 286 285 Usage: dsss [dsss options] <command> [options] … … 293 292 install: install all or some binaries or libraries 294 293 uninstall: uninstall a specified tool or library 295 installed: list installed software`) ;294 installed: list installed software`).newline; 296 295 version(DSSS_Light) {} else { 297 writefln(298 ` net: Internet-based installation and package management`) ;296 Cout( 297 ` net: Internet-based installation and package management`).newline; 299 298 } 300 writefln(301 ` genconfig: generate a config file`) ;299 Cout( 300 ` genconfig: generate a config file`).newline; 302 301 303 302 } else if (command == cmd_t.BUILD) { 304 writefln(303 Cout( 305 304 `Usage: dsss [dsss options] build [build options] [sources, binaries or packages]` 306 ) ;305 ).newline; 307 306 308 307 } else if (command == cmd_t.CLEAN) { 309 writefln(308 Cout( 310 309 `Usage: dsss [dsss options] clean [clean options] [sources, binaries or packages]` 311 ) ;310 ).newline; 312 311 313 312 } else if (command == cmd_t.DISTCLEAN) { 314 writefln(313 Cout( 315 314 `Usage: dsss [dsss options] distclean [distclean options] [sources, binaries or packages]` 316 ) ;315 ).newline; 317 316 318 317 } else if (command == cmd_t.INSTALL) { 319 writefln(318 Cout( 320 319 `Usage: dsss [dsss options] install [install options] [sources, binaries or packages]` 321 ) ;320 ).newline; 322 321 323 322 } else if (command == cmd_t.UNINSTALL) { 324 writefln(323 Cout( 325 324 `Usage: dsss [dsss options] uninstall [uninstall options] <tools or libraries>` 326 ) ;325 ).newline; 327 326 328 327 } else if (command == cmd_t.INSTALLED) { 329 writefln(328 Cout( 330 329 `Usage: dsss [dsss options] installed` 331 ) ;330 ).newline; 332 331 333 332 } else if (command == cmd_t.NET) { 334 writefln(333 Cout( 335 334 `Usage: dsss [dsss options] net <net command> [options] <package name> 336 335 Net Commands: … … 342 341 list: list all installable packages 343 342 search: find an installable package by name` 344 ) ;343 ).newline; 345 344 346 345 347 346 } else if (command == cmd_t.GENCONFIG) { 348 writefln(347 Cout( 349 348 `Usage: dsss [dsss options] genconfig [install options] [sources, binaries or packages]` 350 ) ;351 352 } 353 354 writefln(349 ).newline; 350 351 } 352 353 Cout( 355 354 ` Generic options (must proceed the command): 356 355 --help: display specific options and information … … 366 365 --scratchdir=<dir> [default /tmp] 367 366 368 All other options are passed through to rebuild and ultimately the compiler.`) ;369 370 } 367 All other options are passed through to rebuild and ultimately the compiler.`).newline; 368 369 }
