Add default config generation

This commit is contained in:
Thraix
2019-10-10 23:26:10 +02:00
parent 647ce0e3d8
commit 67de469181
5 changed files with 60 additions and 5 deletions
+8
View File
@@ -34,6 +34,9 @@ void ConfigCLI::DisplayGenHelp()
LOG_INFO("");
LOG_INFO("options:");
LOG_INFO(" prompt Prompt the user for all needed settings");
LOG_INFO(" default Generate a default config file. Source directory is set to");
LOG_INFO(" src/, outputdir is set to bin/ and project name is set to");
LOG_INFO(" the current directory name.");
}
void ConfigCLI::DisplayAddHelp()
@@ -158,6 +161,11 @@ int ConfigCLI::Gen(int argc, char** argv)
ConfigFile::Gen().Save();
return 0;
}
if(option == "default")
{
ConfigFile{}.Save();
return 0;
}
else
{
LOG_ERROR("Invalid option: ", option);