aboutsummaryrefslogtreecommitdiff
path: root/bdep/new.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-06-04 13:40:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-06-04 13:40:26 +0200
commit49887d80b7986ba3df5306ea0aa985034fdb0444 (patch)
treec601f004e42b2ef27c74e5b41d149db4d607856b /bdep/new.cxx
parent7bc20238740dd4b5beeb40e6a84929c7f9c5a751 (diff)
Add --existing|-e option to bdep-{init,new} -C and bdep-config create modes
With this option bdep initializes a bpkg configuration based on an existing build system configuration instead of creating a new one.
Diffstat (limited to 'bdep/new.cxx')
-rw-r--r--bdep/new.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/bdep/new.cxx b/bdep/new.cxx
index c74c90c..e94229f 100644
--- a/bdep/new.cxx
+++ b/bdep/new.cxx
@@ -60,6 +60,9 @@ namespace bdep
if (!ca && !cc)
fail << n << " specified without --config-(add|create)";
+ if (o.existing () && !cc)
+ fail << "--existing|-e specified without --config-create";
+
if (o.wipe () && !cc)
fail << "--wipe specified without --config-create";
}