Added clean command.
This commit is contained in:
parent
1a442c4b9d
commit
8f67837925
14
build.d
14
build.d
|
@ -24,7 +24,19 @@ const string[] COMPILER_FLAGS = [
|
|||
];
|
||||
|
||||
int main(string[] args) {
|
||||
build();
|
||||
if (args.length < 2) {
|
||||
return build();
|
||||
}
|
||||
string command = args[1].strip.toLower;
|
||||
if (command == "build") return build();
|
||||
if (command == "clean") return clean();
|
||||
|
||||
writefln!"Unknown command: \"%s\"."(command);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int clean() {
|
||||
rmdirRecurse(BUILD_DIR);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue