summaryrefslogtreecommitdiff
path: root/localserver/applicator.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-08-20 13:51:25 -0300
committerJesusaves <cpntb1@ymail.com>2019-08-20 13:51:25 -0300
commitde008431a99102fce3eab7453ffe0763a2807e00 (patch)
tree63b926480247e334610a3e8d2993ab7d3281d5c4 /localserver/applicator.py
parentc0a23d30276cf9b2d508d728febdd2c3b9354378 (diff)
downloadtools-de008431a99102fce3eab7453ffe0763a2807e00.tar.gz
tools-de008431a99102fce3eab7453ffe0763a2807e00.tar.bz2
tools-de008431a99102fce3eab7453ffe0763a2807e00.tar.xz
tools-de008431a99102fce3eab7453ffe0763a2807e00.zip
Localserver: Deploy a new patch which handles server partial updates.
I know, I need to upgrade server urgently, we're three releases behind %%n This will fast-forward a few fixes, add support for get/set-unittitle(), add delitemidx() for Bracco, fix a bug on pc_statusup (thanks 4144) and then, give some EXP for homunculus in combat.
Diffstat (limited to 'localserver/applicator.py')
-rw-r--r--localserver/applicator.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/localserver/applicator.py b/localserver/applicator.py
new file mode 100644
index 0000000..7d5761b
--- /dev/null
+++ b/localserver/applicator.py
@@ -0,0 +1,20 @@
+import subprocess
+
+# Open reapply.patch3
+f=open("reapply.patch3", "r")
+subprocess.call("cd ../../server-code", shell=True)
+
+for line in f:
+ if line[0] == "#" or line[0] == "\r" or line[0] == "\n":
+ continue
+ print "Downloading patch "+line.replace("\n", "")
+ subprocess.call("cd ../../server-code ; wget https://gitlab.com/evol/hercules/commit/"+line.replace("\n", "")+".diff", shell=True)
+ print "Applying patch..."
+ #subprocess.call("cd ../../server-code ; ls", shell=True)
+ subprocess.call("cd ../../server-code ; git apply --ignore-whitespace --reject "+line.replace("\n", "")+".diff", shell=True)
+ print "Patch applied"
+ subprocess.call("cd ../../server-code ; rm "+line.replace("\n", "")+".diff", shell=True)
+ print "Patch deleted (success)"
+
+
+f.close()