diff options
Diffstat (limited to 'repo.py')
-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: |