Change repourl
This commit is contained in:
parent
1920b9c9f0
commit
8346f25736
10
src/pack.py
10
src/pack.py
|
@ -11,8 +11,7 @@ class Pack:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
self.repourl = os.environ.get("RESOURCE_PACK_URL")
|
self.repourl = os.environ.get("RESOURCE_PACK_URL")
|
||||||
command = "git clone " + self.repourl
|
command = "git clone " + self.repourl + " resourcepack"
|
||||||
self.dir = re.split("/|\.", self.repourl)[1]
|
|
||||||
status = os.system(command)
|
status = os.system(command)
|
||||||
print(status)
|
print(status)
|
||||||
|
|
||||||
|
@ -26,16 +25,15 @@ class Pack:
|
||||||
shutil.rmtree(self.dir)
|
shutil.rmtree(self.dir)
|
||||||
|
|
||||||
def pull(self) -> None:
|
def pull(self) -> None:
|
||||||
|
|
||||||
os.system("git -C {} pull origin master".format(self.dir))
|
os.system("git -C {} pull origin master".format(self.dir))
|
||||||
|
|
||||||
def collate(self) -> None:
|
def collate(self) -> None:
|
||||||
if os.path.exists("pack"):
|
if os.path.exists("pack"):
|
||||||
shutil.rmtree("pack")
|
shutil.rmtree("pack")
|
||||||
os.mkdir("pack")
|
os.mkdir("pack")
|
||||||
shutil.copytree(self.dir+"/assets", "pack/assets")
|
shutil.copytree("resourcepack/assets", "pack/assets")
|
||||||
shutil.copy("ResourcePack/pack.mcmeta", "pack/pack.mcmeta")
|
shutil.copy("resourcepack/pack.mcmeta", "pack/pack.mcmeta")
|
||||||
shutil.copy("ResourcePack/pack.png", "pack/pack.png")
|
shutil.copy("resourcepack/pack.png", "pack/pack.png")
|
||||||
|
|
||||||
|
|
||||||
def compress(self) -> None:
|
def compress(self) -> None:
|
||||||
|
|
Loading…
Reference in New Issue