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:
19
dzonegit.py
19
dzonegit.py
@ -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()
|
||||
|
Reference in New Issue
Block a user