summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-23 02:41:00 -0500
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-23 02:41:00 -0500
commit35a6a5c870164947ce4e865b30e8b93f320d0ab5 (patch)
tree6dc372290330fdba430b9821c327de9aba5d9de7 /tools
parentc0788e4d6ae801f13f242b252ea9d0084c30c04a (diff)
feat: libsteps: error handling and parsing functions/operators.
feat: mimick nekernel filesystem tree in repository as well. feat: update modules as well. Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/steps.cc17
1 files changed, 12 insertions, 5 deletions
diff --git a/tools/steps.cc b/tools/steps.cc
index 3b61ef2..6b9a8f7 100644
--- a/tools/steps.cc
+++ b/tools/steps.cc
@@ -1,8 +1,8 @@
-/* -------------------------------------------
+/* ===========================================================
Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
-------------------------------------------- */
+=========================================================== */
#include <libocl/dev/lib/io/print.hpp>
#include <libsteps/dev/lib/steps.hpp>
@@ -10,15 +10,22 @@ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license.
/// =========================================================== ///
/// Use operators from steps namespace to compare steps records.
/// =========================================================== ///
-using namespace steps::operators;
+using namespace ocl::steps::operators;
+
+const auto kStepsFileRoot = "/system/install.stp";
/// =========================================================== ///
/// @brief Main function for running steps on NeKernel.
/// =========================================================== ///
-int main(int argc, char **argv) {
+int main(void) {
ocl::io::print("steps: running steps for program...\n");
- steps::record steps;
+ std::ifstream file(kStepsFileRoot);
+ ocl::steps::record steps;
+
+ file >> steps;
+
+ if (!ocl::steps::is_valid(steps)) return EXIT_FAILURE;
/// AMLALE: Read steps from file and process them.