forked from DrBeako/Gregtech_Boiler_Blower
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.py
More file actions
23 lines (18 loc) · 642 Bytes
/
update.py
File metadata and controls
23 lines (18 loc) · 642 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/python3
from os import system, chdir, path
from subprocess import Popen
from threading import Thread
def main():
chdir(path.dirname(path.realpath(__file__)))
system("git checkout HEAD -- index.toml pack.toml")
if (system("git pull -q")!=0):
system("git stash")
system("git pull")
system("git stash pop")
print("Merge conflict. Review in vscode.")
exit(1)
server = Popen(["packwiz", "serve"])
chdir(path.join("..", "minecraft"))
system("java -jar packwiz-installer-bootstrap.jar http://localhost:8080/pack.toml")
server.kill()
if __name__=="__main__": main()