summaryrefslogtreecommitdiffhomepage
path: root/cli/BuilderJSON.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'cli/BuilderJSON.cxx')
-rw-r--r--cli/BuilderJSON.cxx62
1 files changed, 0 insertions, 62 deletions
diff --git a/cli/BuilderJSON.cxx b/cli/BuilderJSON.cxx
deleted file mode 100644
index cffbe45..0000000
--- a/cli/BuilderJSON.cxx
+++ /dev/null
@@ -1,62 +0,0 @@
-#include <cstdio>
-#include <manifest_builder.hxx>
-#include <cstddef>
-#include <string>
-#include <iostream>
-#include <thread>
-
-int cJobIndex = 0;
-bool cFailed = false;
-
-int main(int argc, char** argv)
-{
- cJobIndex = argc - 1;
-
- for (size_t index = 1; index < argc; ++index)
- {
- std::string index_json = argv[index];
-
- if (index_json == "/Ver" ||
- index_json == "/Version" ||
- index_json == "/?" ||
- index_json == "/Help")
- {
- std::cout << "btb: 🚀 Basic Tool for Building (JSON support).\n";
- std::cout << "btb: Brought to you by Amlal El Mahrouss.\n";
- std::cout << "btb: © ZKA Technologies, all rights reserved.\n";
-
- if (index_json == "/?" ||
- index_json == "/Help")
- std::cout << "btb: 🆘 run file: btb <json_path>.json\n";
-
- return 0;
- }
-
- std::thread job([](std::string index_json) -> void {
- std::cout << "btb: " << index_json << std::endl;
-
- ManifestBuilder builder;
-
- if (!builder.buildJson(index_json.size(), index_json.c_str()))
- {
- std::string format = "btb ";
- format += index_json;
-
- perror(format.c_str());
-
- cFailed = true;
- }
-
- --cJobIndex;
- },
- index_json);
-
- job.detach();
- }
-
- // wait for completion of all jobs.
- while (cJobIndex)
- ;
-
- return cFailed ? 1 : 0;
-}