build: add subcommands to kexttool

This commit is contained in:
2023-04-05 18:53:10 +01:00
parent 3ec25da693
commit eb22e72568
4 changed files with 82 additions and 20 deletions

View File

@@ -1,10 +1,26 @@
import yaml
import io
import os
import glob
class KextSource:
__kext_info = {}
__src_dir_path = ''
def scan(path):
result = []
scan_arg = os.path.join(path, '**/extension.yaml')
for filename in glob.iglob(scan_arg, recursive=True):
try:
kext_src = KextSource(filename)
except Exception as e:
continue
result.append(kext_src)
return result
def __init__(self, info_file):