diff options
author | Mark Powers <mark@marks.kitchen> | 2022-02-19 21:18:55 -0600 |
---|---|---|
committer | Mark Powers <mark@marks.kitchen> | 2022-02-19 21:18:55 -0600 |
commit | 226e06bda7f5ac330b7bfc9b396af5e22b3a56f9 (patch) | |
tree | 4ba73b5941d68159b6b5caed66fae0b97d3d16ce | |
parent | ddf0abab32cad09c35612af7c0b8bf7ef3b1e884 (diff) |
Add license command
-rwxr-xr-x | repo.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -37,6 +37,12 @@ def init_repo(args): else: print("Repo already exists") +def add_gpl(args): + subprocess.run(["wget", "--output-document=LICENSE", + "https://www.gnu.org/licenses/gpl-3.0.txt"]) + subprocess.run(["git", "add", "LICENSE"]) + subprocess.run(["git", "commit", "-m", "Add LICENSE"]) + def main(): parser = argparse.ArgumentParser("wikijscmd") parser.set_defaults(command=None) @@ -52,6 +58,9 @@ def main(): parser_init = subparsers.add_parser("init", help="create repos") parser_init.set_defaults(command=init_repo) + parser_license = subparsers.add_parser("license", help="add license") + parser_license.set_defaults(command=add_gpl) + args = vars(parser.parse_args()) callback = args["command"] if callback is None: |