diff options
author | Mark Powers <mark@marks.kitchen> | 2024-07-14 15:22:15 -0500 |
---|---|---|
committer | Mark Powers <mark@marks.kitchen> | 2024-07-14 15:22:15 -0500 |
commit | 8cd2b2fc35c208d4a072969e8cea35acaa831af4 (patch) | |
tree | 98f676ee247495476bd5fdf30ff722c43b2789dc /repo.py | |
parent | 226e06bda7f5ac330b7bfc9b396af5e22b3a56f9 (diff) |
Diffstat (limited to 'repo.py')
-rwxr-xr-x | repo.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -37,6 +37,13 @@ def init_repo(args): else: print("Repo already exists") +def description(args): + name = args["name"] + description = args["description"] + git_dir = f"/srv/git/{name}.git" + subprocess.run([ + "ssh", "git@marks.kitchen", f"echo '{description}' > {git_dir}/description"]) + def add_gpl(args): subprocess.run(["wget", "--output-document=LICENSE", "https://www.gnu.org/licenses/gpl-3.0.txt"]) @@ -61,6 +68,11 @@ def main(): parser_license = subparsers.add_parser("license", help="add license") parser_license.set_defaults(command=add_gpl) + parser_description = subparsers.add_parser("description", help="set description") + parser_description.add_argument("name", type=str, help="repo name") + parser_description.add_argument("description", type=str, help="description") + parser_description.set_defaults(command=description) + args = vars(parser.parse_args()) callback = args["command"] if callback is None: |