summaryrefslogtreecommitdiff
path: root/template.update.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-10-23 21:44:22 -0300
committerJesusaves <cpntb1@ymail.com>2022-10-23 21:44:22 -0300
commita7c45a192268da2601cef47a4cdba987ae2327ca (patch)
treec5fb5b97db109fe7106496dd96498c475881046b /template.update.py
downloadserverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.gz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.bz2
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.xz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.zip
Initial commit (Moubootaur Legends fork)
Diffstat (limited to 'template.update.py')
-rw-r--r--template.update.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/template.update.py b/template.update.py
new file mode 100644
index 0000000..62bc1bc
--- /dev/null
+++ b/template.update.py
@@ -0,0 +1,26 @@
+#!/usr/bin/python2.7
+print("git diff --name-status previous HEAD > x.diff")
+
+f=open("x.diff", "r")
+xdiff=[]
+
+for l in f:
+ xdiff.append(l.replace('\n', '').replace('M\t','').replace('A\t',''))
+
+f.close()
+
+
+f=open("deployupdate.sh", "w");
+for i in xdiff:
+ a=i.split('/')
+ #print str(a)
+ path="/"
+ #print str(a[:-1])
+ path=path.join( a[:-1] )
+ #print path
+ f.write("scp -4 -P 22 %s username@tmw2.org:/home/username/serverdata/%s/%s\n" % (i, path, a[len(a)-1]))
+
+#f.write("\ncd ..\n")
+f.close()
+
+print("To deploy update, please run: ./deployupdate.sh");