Skip to content

Instantly share code, notes, and snippets.

@snth
Created November 3, 2021 05:10
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save snth/c5c5a1236dd8ddf91973aed77d66cd9a to your computer and use it in GitHub Desktop.
Save snth/c5c5a1236dd8ddf91973aed77d66cd9a to your computer and use it in GitHub Desktop.
Procedural version of do nothing script
import sys
def wait_for_enter():
input("Press Enter to continue: ")
def create_ssh_keys(context):
"""Run:
ssh-keygen -t rsa -f ~/{username}
"""
pass
def git_commit_step(context):
"""Run:
git commit {username}
"""
pass
if __name__ == "__main__":
context = {"username": sys.argv[1]}
print(context)
steps = [create_ssh_keys, git_commit_step]
for step in steps:
print(step.__doc__.format(**context))
step(context)
wait_for_enter()
print("Done.")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment