mirror of
https://jturnerusa.dev/cgit/gentoo-utils/
synced 2025-12-03 03:28:35 -06:00
15 lines
306 B
Python
Executable File
15 lines
306 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
import portage
|
|
|
|
for line in sys.stdin.buffer:
|
|
a, b = line.decode().split(" ")
|
|
|
|
try:
|
|
sys.stdout.buffer.write(f"{portage.vercmp(a, b)}\n".encode())
|
|
except:
|
|
sys.stdout.buffer.write(b"err\n")
|
|
finally:
|
|
sys.stdout.buffer.flush()
|