diff --git a/scripts/build.py b/scripts/build.py index fe22e22..86593cd 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -1,6 +1,7 @@ from twrpdtgen.device_tree import DeviceTree import argparse import os +from pathlib import Path if __name__ == '__main__': parser = argparse.ArgumentParser(description="Auto-Twrp-Builder") parser.add_argument('-i', '--input', type=str, default='', help='Recovery/Boot Image') @@ -11,11 +12,10 @@ exit() if not os.path.exists(args.output): os.makedirs(args.output, exist_ok=True) - device_tree = DeviceTree(args.input) + device_tree = DeviceTree(Path(args.input)) if os.getenv('GITHUB_OUTPUT', ''): with open(os.getenv('GITHUB_OUTPUT', ''), 'w') as f: f.write(f'DEVICE_NAME={device_tree.device_info.manufacturer}\n') f.write(f'MAKEFILE_NAME=omni_{device_tree.device_info.codename}\n') f.write(f'DEVICE_PATH={os.path.basename(args.output) / device_tree.device_info.manufacturer / device_tree.device_info.codename}') - device_tree.dump_to_folder(args.output) - + device_tree.dump_to_folder(Path(args.output))