summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--template.update.py26
2 files changed, 27 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 200fe1526..61998ddee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -133,3 +133,4 @@ npc/commands/motd-debug-text.txt
# other files
npc/00000SAVE/*
+deployupdate.sh
diff --git a/template.update.py b/template.update.py
new file mode 100644
index 000000000..62bc1bc01
--- /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");