hyperion.ng/test/jsonchecks/version.py

15 lines
259 B
Python
Raw Normal View History

2019-06-19 19:04:54 +02:00
#!/usr/bin/env python
import json, sys
retval = 0
with open(sys.argv[1]) as f:
2019-06-22 16:12:09 +02:00
if len(sys.argv) < 3:
data = json.load(f)
sys.stdout.write(data['versionnr'])
sys.exit(0)
else:
data = json.load(f)
sys.stdout.write(data['channel'])
sys.exit(0)