mirror of
https://github.com/QuantumPackage/qp2.git
synced 2024-12-22 03:23:29 +01:00
Merge pull request #29 from mveril/repo-custom-name
Add the posiblity to set custom name when we download git repo
This commit is contained in:
commit
832dbe10fa
@ -3,7 +3,7 @@
|
|||||||
"""
|
"""
|
||||||
Usage:
|
Usage:
|
||||||
qp_plugins list [-iuq]
|
qp_plugins list [-iuq]
|
||||||
qp_plugins download <url>
|
qp_plugins download <url> [-n <name>]
|
||||||
qp_plugins install <name>...
|
qp_plugins install <name>...
|
||||||
qp_plugins uninstall <name>
|
qp_plugins uninstall <name>
|
||||||
qp_plugins create -n <name> [-r <repo>] [<needed_modules>...]
|
qp_plugins create -n <name> [-r <repo>] [<needed_modules>...]
|
||||||
@ -186,7 +186,10 @@ def main(arguments):
|
|||||||
url.endswith(".zip"))
|
url.endswith(".zip"))
|
||||||
os.chdir(QP_PLUGINS)
|
os.chdir(QP_PLUGINS)
|
||||||
if is_repo:
|
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:
|
else:
|
||||||
filename = url.split('/')[-1]
|
filename = url.split('/')[-1]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user