// file : bpkg/pkg-command.hxx -*- C++ -*- // license : MIT; see accompanying LICENSE file #ifndef BPKG_PKG_COMMAND_HXX #define BPKG_PKG_COMMAND_HXX #include #include // selected_package #include #include namespace bpkg { // Common pkg-{update,clean,test,install,...} implementation. // // If cmd_variant is not empty, then the -for- is performed // instead. // // The command can also be performed recursively for all or immediate // dependencies of the specified or all the held packages. // int pkg_command (const string& cmd, // Without the 'pkg-' prefix. const configuration_options&, const string& cmd_variant, bool recursive, bool immediate, bool all, bool package_cwd, cli::group_scanner& args); struct pkg_command_vars { shared_ptr pkg; strings vars; // Package-specific command line vars. bool cwd; // Change the working directory to the package directory. }; void pkg_command (const string& cmd, const dir_path& configuration, const common_options&, const string& cmd_variant, const strings& common_vars, const vector&); } #endif // BPKG_PKG_COMMAND_HXX