1
0
mirror of https://github.com/oskar456/dzonegit.git synced 2024-05-11 05:55:41 +00:00

Revert "Drop dzonegit multi-call executable"

This reverts commit 9a521350d3.
Since there is no Python dependency, it may be actually handy to call
the script as is.
This commit is contained in:
Ondřej Caletka
2018-08-15 13:17:33 +02:00
parent b608c25372
commit c9026ff21b
2 changed files with 20 additions and 0 deletions

View File

@ -493,3 +493,22 @@ def post_receive(stdin=sys.stdin):
cmd.append(z)
print("Calling {}".format(" ".join(cmd)))
subprocess.run(cmd)
def main():
name = Path(sys.argv[0]).name
print(name)
if name == "pre-commit":
pre_commit()
elif name == "update":
update()
elif name == "pre-receive":
pre_receive()
elif name == "post-receive":
post_receive()
else:
sys.exit("No valid command found")
if __name__ == "__main__":
main()