Added "version", "help" and "clean" args.
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
#include "Output.hpp"
|
||||
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
|
||||
#include "fmt/base.h"
|
||||
#include "fmt/color.h"
|
||||
#include <cstdlib>
|
||||
|
||||
namespace Output {
|
||||
void printMenu() {
|
||||
@@ -22,14 +26,32 @@ namespace Output {
|
||||
fmt::print(fmt::fg(fmt::color::light_coral),
|
||||
" install Run cmake --install. Needs admin privileges.\n"
|
||||
);
|
||||
fmt::print(fmt::fg(fmt::color::light_coral),
|
||||
fmt::print(fmt::fg(fmt::color::light_green),
|
||||
" clean Clean the build directory.\n"
|
||||
);
|
||||
fmt::print(fmt::fg(fmt::color::light_coral),
|
||||
fmt::print(fmt::fg(fmt::color::light_green),
|
||||
" help Show help.\n"
|
||||
);
|
||||
fmt::print(fmt::fg(fmt::color::light_green),
|
||||
" version Current cmkr version.\n"
|
||||
);
|
||||
}
|
||||
|
||||
void printArgClean() {
|
||||
std::filesystem::path dirPath = "build";
|
||||
|
||||
if (!std::filesystem::exists(dirPath) || !std::filesystem::is_directory(dirPath)) return;
|
||||
|
||||
for (const auto& entry : std::filesystem::directory_iterator(dirPath)) {
|
||||
std::filesystem::remove_all(entry.path());
|
||||
}
|
||||
|
||||
fmt::print(fmt::fg(fmt::color::light_green),
|
||||
"[Lazymake] Cleaned up build directory!\n"
|
||||
);
|
||||
}
|
||||
|
||||
void printArgVersion() {
|
||||
fmt::print("Version: 0.0.1 (Early pre-pre-pre-pre alpha\n");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user