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):
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue