build: add subcommands to kexttool
This commit is contained in:
19
tools/kexttool/select.py
Normal file
19
tools/kexttool/select.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import inquirer
|
||||
import os
|
||||
from kexttool import kext
|
||||
|
||||
|
||||
def select_kexts():
|
||||
all_kexts = [ k.id() for k in kext.KextSource.scan(os.path.join(os.getcwd(), 'extensions')) ]
|
||||
if len(all_kexts) == 0:
|
||||
print('No kernel extensions available.')
|
||||
return
|
||||
|
||||
questions = [
|
||||
inquirer.Checkbox('kexts',
|
||||
message="Select kexts to include in the kernel image",
|
||||
choices=all_kexts,
|
||||
)
|
||||
]
|
||||
answers = inquirer.prompt(questions)
|
||||
print(answers["kexts"])
|
||||
Reference in New Issue
Block a user