diff options
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); |