Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
ColdWindScholar committed May 3, 2024
1 parent 420515b commit 7e659b8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/build.py
Original file line number Diff line number Diff line change
@@ -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')
Expand All @@ -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))

0 comments on commit 7e659b8

Please sign in to comment.