mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
New update function
This commit is contained in:
parent
f6158c0f99
commit
9872f22155
@ -1,3 +1,4 @@
|
||||
spicemanip>=0.1.6
|
||||
gitpython
|
||||
pygit2
|
||||
fake-useragent
|
||||
|
||||
@ -16,7 +16,7 @@ from fake_useragent import UserAgent
|
||||
from difflib import SequenceMatcher
|
||||
from operator import itemgetter
|
||||
from collections import abc
|
||||
from git import Repo
|
||||
from pygit2 import clone_repository
|
||||
|
||||
import spicemanip
|
||||
|
||||
@ -348,10 +348,11 @@ def spicebot_update(bot, deps=False):
|
||||
|
||||
if not os.path.exists("/tmp") or not os.path.isdir("/tmp"):
|
||||
os.system("sudo mkdir /tmp")
|
||||
if not os.path.exists("/tmp/SpiceBot") or not os.path.isdir("/tmp/SpiceBot"):
|
||||
os.system("sudo mkdir /tmp/SpiceBot")
|
||||
clonepath = "/tmp/SpiceBot"
|
||||
if not os.path.exists(clonepath) or not os.path.isdir(clonepath):
|
||||
os.system(clonepath)
|
||||
|
||||
Repo.clone_from(str(github_dict["url_main"] + github_dict["repo_owner"] + "/" + github_dict["repo_name"] + ".git"), "/tmp/SpiceBot")
|
||||
clone_repository(str(bot.config.SpiceBot_Update.gitrepo + ".git"), clonepath, checkout_branch=bot.config.SpiceBot_Update.gitbranch)
|
||||
|
||||
pipcommand = "sudo pip3 install --upgrade"
|
||||
if not deps:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user