cleanup from last
parent
368b751a63
commit
e2a7390064
|
@ -24,4 +24,16 @@ int cmd_create(int argc, char** argv);
|
||||||
* @param argv Array of arguments
|
* @param argv Array of arguments
|
||||||
* @return 0 on success, non-zero on failure
|
* @return 0 on success, non-zero on failure
|
||||||
*/
|
*/
|
||||||
int cmd_help(int argc, char** argv);
|
int cmd_help(int argc, char** argv);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Handler for unknown commands
|
||||||
|
*
|
||||||
|
* Displays an error message for unrecognized commands.
|
||||||
|
*
|
||||||
|
* @param command The unrecognized command string
|
||||||
|
* @param argc Number of arguments
|
||||||
|
* @param argv Array of arguments
|
||||||
|
* @return 1 to indicate failure
|
||||||
|
*/
|
||||||
|
int cmd_unknown(const char* command, int argc, char** argv);
|
||||||
|
|
|
@ -31,26 +31,5 @@
|
||||||
*/
|
*/
|
||||||
std::string expand_path(const std::string& path);
|
std::string expand_path(const std::string& path);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Handler for the help command
|
|
||||||
*
|
|
||||||
* Displays information about available commands in the build module.
|
|
||||||
*
|
|
||||||
* @param argc Number of arguments
|
|
||||||
* @param argv Array of arguments
|
|
||||||
* @return 0 on success, non-zero on failure
|
|
||||||
*/
|
|
||||||
int cmd_help(int argc, char** argv);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Handler for unknown commands
|
|
||||||
*
|
|
||||||
* Displays an error message for unrecognized commands.
|
|
||||||
*
|
|
||||||
* @param command The unrecognized command string
|
|
||||||
* @param argc Number of arguments
|
|
||||||
* @param argv Array of arguments
|
|
||||||
* @return 1 to indicate failure
|
|
||||||
*/
|
|
||||||
int cmd_unknown(const char* command, int argc, char** argv);
|
|
||||||
|
|
||||||
|
|
|
@ -145,9 +145,6 @@ Command parse_command(const char* cmd_str) {
|
||||||
return CMD_UNKNOWN;
|
return CMD_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Validates the build options
|
|
||||||
*/
|
|
||||||
int validate_build_options(const BuildOptions& options) {
|
int validate_build_options(const BuildOptions& options) {
|
||||||
// Check if contents directory is provided and exists
|
// Check if contents directory is provided and exists
|
||||||
if (options.contents_dir.empty()) {
|
if (options.contents_dir.empty()) {
|
||||||
|
|
|
@ -52,9 +52,6 @@ int cmd_create(int argc, char** argv) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Handler for the help command
|
|
||||||
*/
|
|
||||||
int cmd_help(int argc, char** argv) {
|
int cmd_help(int argc, char** argv) {
|
||||||
dpm_log(LOG_INFO, "DPM Build Module - Creates DPM packages according to specification");
|
dpm_log(LOG_INFO, "DPM Build Module - Creates DPM packages according to specification");
|
||||||
dpm_log(LOG_INFO, "Available commands:");
|
dpm_log(LOG_INFO, "Available commands:");
|
||||||
|
@ -75,9 +72,6 @@ int cmd_help(int argc, char** argv) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Handler for unknown commands
|
|
||||||
*/
|
|
||||||
int cmd_unknown(const char* command, int argc, char** argv) {
|
int cmd_unknown(const char* command, int argc, char** argv) {
|
||||||
std::string msg = "Unknown command: ";
|
std::string msg = "Unknown command: ";
|
||||||
msg += (command ? command : "");
|
msg += (command ? command : "");
|
||||||
|
|
|
@ -13,9 +13,6 @@
|
||||||
|
|
||||||
#include "helpers.hpp"
|
#include "helpers.hpp"
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Expands environment variables and tildes in a path
|
|
||||||
*/
|
|
||||||
std::string expand_path(const std::string& path) {
|
std::string expand_path(const std::string& path) {
|
||||||
wordexp_t exp_result;
|
wordexp_t exp_result;
|
||||||
std::string expanded_path = path;
|
std::string expanded_path = path;
|
||||||
|
|
Loading…
Reference in New Issue