From 234428e21adde0ddf60f9665edad3dcfb9fd2584 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 24 Mar 2018 13:29:06 +0200 Subject: Implement --config-create|-C in init and new --- bdep/init.cxx | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'bdep/init.cxx') diff --git a/bdep/init.cxx b/bdep/init.cxx index 9b0ed37..6fda0a2 100644 --- a/bdep/init.cxx +++ b/bdep/init.cxx @@ -21,13 +21,13 @@ namespace bdep const dir_path& prj, database& db, const dir_path& cfg, + cli::scanner& args, bool ca, bool cc, optional cd) { const char* m (!ca ? "--config-create" : - !cc ? "--config-add" : - nullptr); + !cc ? "--config-add" : nullptr); if (m == nullptr) fail << "both --config-add and --config-create specified"; @@ -51,13 +51,8 @@ namespace bdep } return ca - ? cmd_config_add (prj, - db, - cfg, - move (name), - cd, - move (id)) - : nullptr; // @@ TODO: create + ? cmd_config_add ( prj, db, cfg, move (name), cd, move (id)) + : cmd_config_create (o, prj, db, cfg, args, move (name), cd, move (id)); } void @@ -129,7 +124,7 @@ namespace bdep } int - cmd_init (const cmd_init_options& o, cli::scanner&) + cmd_init (const cmd_init_options& o, cli::scanner& args) { tracer trace ("init"); @@ -200,6 +195,7 @@ namespace bdep prj, db, ca ? o.config_add () : o.config_create (), + args, ca, cc, cd)); -- cgit v1.1