From 43f921fffb4d523df9b85e967bc30a9a0c59fde4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Sat, 23 Mar 2019 12:51:53 +0100 Subject: [PATCH 1/2] Add the posiblity to set custom name when we download git repo --- bin/qp_plugins | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bin/qp_plugins b/bin/qp_plugins index 1a591e53..564be940 100755 --- a/bin/qp_plugins +++ b/bin/qp_plugins @@ -3,7 +3,7 @@ """ Usage: qp_plugins list [-iuq] - qp_plugins download + qp_plugins download [-n ] qp_plugins install ... qp_plugins uninstall qp_plugins create -n [-r ] [...] @@ -186,7 +186,10 @@ def main(arguments): url.endswith(".zip")) os.chdir(QP_PLUGINS) if is_repo: - subprocess.check_call(["git", "clone", url]) + cmd=["git", "clone", url] + if arguments["--name"]: + cmd=cmd+[arguments["--name"]] + subprocess.check_call(cmd) else: filename = url.split('/')[-1] From c180a534d78f06777841bda4fe245ab12713e5bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Sat, 23 Mar 2019 20:05:29 +0100 Subject: [PATCH 2/2] Cleaning code for qp_plugins download for git repo --- bin/qp_plugins | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/qp_plugins b/bin/qp_plugins index 564be940..dc14b8ea 100755 --- a/bin/qp_plugins +++ b/bin/qp_plugins @@ -186,10 +186,10 @@ def main(arguments): url.endswith(".zip")) os.chdir(QP_PLUGINS) if is_repo: - cmd=["git", "clone", url] + git_cmd=["git", "clone", url] if arguments["--name"]: - cmd=cmd+[arguments["--name"]] - subprocess.check_call(cmd) + git_cmd.append(arguments["--name"]) + subprocess.check_call(git_cmd) else: filename = url.split('/')[-1]