18 lines
529 B
Python
Executable File
18 lines
529 B
Python
Executable File
#!/usr/bin/env python3
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
# Add project root to sys.path when running from source checkout
|
|
root_dir = Path(__file__).resolve().parent.parent
|
|
if str(root_dir) not in sys.path:
|
|
sys.path.insert(0, str(root_dir))
|
|
|
|
for candidate in ("/usr/lib/inventory-collector", "/usr/local/lib/inventory-collector"):
|
|
if candidate not in sys.path and Path(candidate).is_dir():
|
|
sys.path.insert(0, candidate)
|
|
|
|
from inventory_collector.cli import main
|
|
|
|
if __name__ == "__main__":
|
|
sys.exit(main())
|