def install(self, plugin):
"Installs a GitHub plugin"
print("Installing...", plugin.name)
import git
# Clone the GitHub repository via the URL.
# git.Git().clone(str(plugin.baseurl), install_dir)
# Checks if the plugin installation path already exists.
if not self.isInstalled(plugin):
"""Clone the GitHub repository via Plugin URL to install_dir and
with depth=1 (shallow clone).
"""
git.Repo.clone_from(plugin.baseurl, self.install_dir, depth=1)
print("Done!")
return True
else:
print("Plugin already installed!")
return False
评论列表
文章目录