diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-24 10:31:18 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-24 10:31:18 +0100 |
| commit | 989092c04649ff07bbb552b2ccc7c9f44569b75c (patch) | |
| tree | 62fe8e3f331179c4a0cf2ae692cabe53c2d36920 /tooling/mk_img.py | |
| parent | 5dcf3ce391288e9d4f5f25120cf722f962e30881 (diff) | |
fix: tooling: fix 'fsck.hefs', 'mkfs.hefs', and 'mk_img.py' tools.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'tooling/mk_img.py')
| -rwxr-xr-x | tooling/mk_img.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tooling/mk_img.py b/tooling/mk_img.py index 28af22e3..f0fa0609 100755 --- a/tooling/mk_img.py +++ b/tooling/mk_img.py @@ -4,7 +4,7 @@ import os import sys import subprocess -import glob +import glob as file_glob def copy_to_fat(image_path, source_dir): if not os.path.isfile(image_path): @@ -16,11 +16,11 @@ def copy_to_fat(image_path, source_dir): sys.exit(1) try: - files_to_copy = glob.glob(os.path.join(source_dir, "*")) - + files_to_copy = file_glob.glob(os.path.join(source_dir, "*")) + if not files_to_copy: - print(f"Warning: No files found in {source_dir}. Nothing to copy.") - return + print(f"Warning: No files found in {source_dir}, nothing to copy.") + sys.exit(1) command = ["mcopy", "-spm", "-i", image_path] + files_to_copy + ["::"] subprocess.run(command, check=True) |
