tools/mkromfs: Create build dir.

Create output dir(s) if they don't exist as not all
tools create them.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
This commit is contained in:
iabdalkader 2025-06-08 09:55:06 +02:00
parent 1a98175ab6
commit c49ee0ed21

View File

@ -168,6 +168,9 @@ def main():
print(f"Error: Invalid JSON format in '{path}'. {str(e)}") print(f"Error: Invalid JSON format in '{path}'. {str(e)}")
sys.exit(1) sys.exit(1)
# Create output dir(s) if they don't exist
os.makedirs(args.build_dir, exist_ok=True)
if args.partition is None: if args.partition is None:
for p in romfs_cfg: for p in romfs_cfg:
romfs_build(romfs_cfg, p, args) romfs_build(romfs_cfg, p, args)