10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-05 05:33:56 +01:00
quantum_package/scripts/utility/is_master_repository.py

15 lines
363 B
Python
Raw Normal View History

2018-04-30 18:43:13 +02:00
#!/usr/bin/env python2
2015-11-07 11:17:07 +01:00
import subprocess
pipe = subprocess.Popen("git config --get remote.origin.url", \
2015-11-07 11:17:07 +01:00
shell=True, stdout=subprocess.PIPE)
result = pipe.stdout.read()
is_master_repository = "LCPQ/quantum_package" in result
if __name__ == "__main__":
import sys
if is_master_repository:
sys.exit(0)
else:
sys.exit(-1)