Change repourl

This commit is contained in:
jimmy 2021-06-12 10:46:02 +00:00
parent 1920b9c9f0
commit 8346f25736
1 changed files with 4 additions and 6 deletions

View File

@ -11,8 +11,7 @@ class Pack:
def __init__(self):
load_dotenv()
self.repourl = os.environ.get("RESOURCE_PACK_URL")
command = "git clone " + self.repourl
self.dir = re.split("/|\.", self.repourl)[1]
command = "git clone " + self.repourl + " resourcepack"
status = os.system(command)
print(status)
@ -26,16 +25,15 @@ class Pack:
shutil.rmtree(self.dir)
def pull(self) -> None:
os.system("git -C {} pull origin master".format(self.dir))
def collate(self) -> None:
if os.path.exists("pack"):
shutil.rmtree("pack")
os.mkdir("pack")
shutil.copytree(self.dir+"/assets", "pack/assets")
shutil.copy("ResourcePack/pack.mcmeta", "pack/pack.mcmeta")
shutil.copy("ResourcePack/pack.png", "pack/pack.png")
shutil.copytree("resourcepack/assets", "pack/assets")
shutil.copy("resourcepack/pack.mcmeta", "pack/pack.mcmeta")
shutil.copy("resourcepack/pack.png", "pack/pack.png")
def compress(self) -> None: