20 lines
531 B
Python
20 lines
531 B
Python
|
|
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"])
|