pmt: Write the function base

- Write the function manager.
 - Make minor changes to the function structure.
 - Add CLI11 license.
 - Added main function to libpmt.
This commit is contained in:
2025-07-28 22:36:15 +03:00
parent 40260d5ae3
commit a58adb6a28
13 changed files with 280 additions and 80 deletions

View File

@@ -65,13 +65,13 @@ void setLoggingState(int state)
bool runCommand(const std::string_view cmd)
{
LOGN(HELPER, INFO) << __func__ << "(): run command request: " << cmd << std::endl;
LOGN(HELPER, INFO) << "run command request: " << cmd << std::endl;
return (system(cmd.data()) == 0) ? true : false;
}
bool confirmPropt(const std::string_view message)
{
LOGN(HELPER, INFO) << __func__ << "(): create confirm propt request. Creating." << std::endl;
LOGN(HELPER, INFO) << "create confirm propt request. Creating." << std::endl;
char p;
printf("%s [ y / n ]: ", message.data());
@@ -122,7 +122,7 @@ std::string currentTime()
std::string runCommandWithOutput(const std::string_view cmd)
{
LOGN(HELPER, INFO) << __func__ << "(): run command and catch out request: " << cmd << std::endl;
LOGN(HELPER, INFO) << "run command and catch out request: " << cmd << std::endl;
FILE* pipe = popen(cmd.data(), "r");
if (!pipe) {