diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2018-07-09 09:48:07 +0200 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-07-27 14:23:07 +0300 |
commit | 07fdebdbb02fde71d6e656ddd46b967347417502 (patch) | |
tree | 594c2f352499aaac0756e3071a4b7ce2aee0fd34 /bdep/utility.hxx | |
parent | 8a87a8bc08f0d692f53a0373da3a0a959de13e52 (diff) |
Implement publish command for publishing packages to archive repositories
Diffstat (limited to 'bdep/utility.hxx')
-rw-r--r-- | bdep/utility.hxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/bdep/utility.hxx b/bdep/utility.hxx index ea8f5d1..7bc1522 100644 --- a/bdep/utility.hxx +++ b/bdep/utility.hxx @@ -15,6 +15,7 @@ #include <libbutl/ft/lang.hxx> #include <libbutl/utility.mxx> // casecmp(), reverse_iterate(), etc +#include <libbutl/prompt.mxx> #include <libbutl/fdstream.mxx> #include <libbutl/filesystem.mxx> @@ -54,6 +55,10 @@ namespace bdep using butl::setenv; using butl::unsetenv; + // <libbutl/prompt.mxx> + // + using butl::yn_prompt; + // <libbutl/filesystem.mxx> // using butl::auto_rmfile; @@ -114,6 +119,10 @@ namespace bdep process start (I&& in, O&& out, E&& err, const P& prog, A&&... args); + template <typename P> + void + finish (const P& prog, process&, bool io_read = false, bool io_write = false); + template <typename P, typename... A> void run (const P& prog, A&&... args); @@ -131,8 +140,11 @@ namespace bdep E&& err, A&&... args); - void - finish_bpkg (const common_options&, process&, bool io_error = false); + inline void + finish_bpkg (const common_options& co, process& pr, bool io_read = false) + { + finish (name_bpkg (co), pr, io_read); + } template <typename... A> void @@ -147,6 +159,12 @@ namespace bdep process start_b (const common_options&, O&& out, E&& err, A&&... args); + inline void + finish_b (const common_options& co, process& pr, bool io_read = false) + { + finish (name_b (co), pr, io_read); + } + template <typename... A> void run_b (const common_options&, A&&... args); |