summaryrefslogtreecommitdiffhomepage
path: root/tooling
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-05-08 10:17:30 +0200
committerAmlal <amlal@nekernel.org>2025-05-08 10:17:30 +0200
commit902bafa5dc8c3ac5fcbf13a5af73e016e9c64685 (patch)
tree01aa45950fa825ad616ee3f8e8a19c7156708aab /tooling
parent8c0d7efb90585bf53b9f7496c2883af5ffa6ee68 (diff)
meta(kernel): saving changes to avoid loss.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'tooling')
-rwxr-xr-xtooling/mk_fwrk.py15
1 files changed, 12 insertions, 3 deletions
diff --git a/tooling/mk_fwrk.py b/tooling/mk_fwrk.py
index e0302754..36cc4e8e 100755
--- a/tooling/mk_fwrk.py
+++ b/tooling/mk_fwrk.py
@@ -13,7 +13,8 @@ def create_directory_structure(base_path, project_name):
".keep": None
},
"src": {
- ".keep": None
+ ".keep": None,
+ "CommandLine.cc": None,
},
"vendor": {
".keep": None
@@ -40,7 +41,8 @@ def create_directory_structure(base_path, project_name):
create_structure(base_path, structure)
# Create the JSON file
- diutil_json_path = os.path.join(base_path, project_name, f"{project_name}.json")
+ proj_json_path = os.path.join(base_path, project_name, f"{project_name}.json")
+
manifest = {
"compiler_path": "clang++",
"compiler_std": "c++20",
@@ -57,9 +59,16 @@ def create_directory_structure(base_path, project_name):
]
}
- with open(diutil_json_path, 'w') as json_file:
+ with open(proj_json_path, 'w') as json_file:
json.dump(manifest, json_file, indent=4)
+ proj_cpp_path = os.path.join(base_path, project_name, f"src/CommandLine.cc")
+
+ cpp_file = "int main() {\n\treturn 0;\n}"
+
+ with open(proj_cpp_path, 'w') as cpp_file_io:
+ cpp_file_io.write(cpp_file)
+
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: mk_fwrk.py <project_name>")