mirror of
https://github.com/UniXNU/UniXNU.git
synced 2026-11-18 10:01:39 +03:00
20 lines
807 B
Python
Executable File
20 lines
807 B
Python
Executable File
#!/usr/bin/env python3
|
|
import importlib.util
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
root = Path(__file__).resolve().parent
|
|
sys.path.insert(0, str(root / 'scripts'))
|
|
# Child output includes tools that bypass the driver's log helper. Keep machine
|
|
# output and redirected streams untouched; the pipe also prevents recursion.
|
|
if (sys.stdout.isatty() and sys.stderr.isatty() and '--json' not in sys.argv
|
|
and not os.environ.get('NO_COLOR') and os.environ.get('TERM') != 'dumb'):
|
|
spec = importlib.util.spec_from_file_location('unixnu_build_log', root / 'scripts/build-log.py')
|
|
output = importlib.util.module_from_spec(spec)
|
|
spec.loader.exec_module(output)
|
|
sys.exit(output.relay([sys.executable, str(root / 'unixnu'), *sys.argv[1:]], None, True))
|
|
from unixnu.cli import main
|
|
|
|
main()
|