28 lines
450 B
Python
Executable File
28 lines
450 B
Python
Executable File
#!/usr/bin/env python3
|
|
# vim: ft=python
|
|
# -*- mode: python -*-
|
|
|
|
import glob
|
|
import inquirer
|
|
import os
|
|
import sys
|
|
from kexttool import kext, scan, select
|
|
|
|
|
|
if len(sys.argv) < 2:
|
|
print('usage: {} <command>'.format(sys.argv[0]))
|
|
exit(0)
|
|
|
|
cmd = sys.argv[1]
|
|
|
|
commands = {
|
|
'select': select.select_kexts,
|
|
'list': scan.list_all
|
|
}
|
|
|
|
if cmd not in commands:
|
|
print('E: unknown command \'{}\''.format(cmd))
|
|
exit(-1)
|
|
|
|
commands[cmd]()
|