From 2df57d72b65012674e6bc64dec66d9b3fd7f993b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 14 May 2018 14:10:56 +0300 Subject: Fallback to output directory removal for --keep-out on disfigure failure --- bpkg/utility.hxx | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) (limited to 'bpkg/utility.hxx') diff --git a/bpkg/utility.hxx b/bpkg/utility.hxx index 85382ef..ae9736d 100644 --- a/bpkg/utility.hxx +++ b/bpkg/utility.hxx @@ -19,6 +19,7 @@ #include #include +#include namespace bpkg { @@ -130,34 +131,14 @@ namespace bpkg auto_fd open_dev_null (); - // Process. - // - // By default the process command line is printed for verbosity >= 2 - // (essential command lines). - // - // If fallback is specified, then this directory is searched for the - // executable as a last resort. - // - void - run (const char* args[], const dir_path& fallback = dir_path ()); - - inline void - run (cstrings& args, const dir_path& fallback = dir_path ()) - { - run (args.data (), fallback); - } - // Directory extracted from argv[0] (i.e., this process' recall directory) // or empty if there is none. Can be used as a search fallback. // extern dir_path exec_dir; // Run build2, mapping verbosity levels. If quiet is true, then run build2 - // quiet if our verbosity level is 1. Common vars (cvars) are set on the - // configuration scope. + // quiet if our verbosity level is 1. // - class common_options; - const char* name_b (const common_options&); @@ -170,13 +151,15 @@ namespace bpkg normal // Run normally (at verbosity 1). }; + template + process + start_b (const common_options&, O&& out, E&& err, verb_b, A&&... args); + + template void - run_b (const common_options&, - const dir_path& configuration, - const string& buildspec, - verb_b = verb_b::normal, - const strings& pvars = strings (), - const strings& cvars = strings ()); + run_b (const common_options&, verb_b, A&&... args); } +#include + #endif // BPKG_UTILITY_HXX -- cgit v1.1