summaryrefslogtreecommitdiff
path: root/template.update.py
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-06-05 16:43:56 -0300
committerJesusaves <cpntb1@ymail.com>2020-06-05 16:43:56 -0300
commit670d1e4f981344a742deeccf0debd696c8943f0d (patch)
treeb738d6c731d283e4bf1046be6a66572e70d19485 /template.update.py
parent8fa9729b1fc9525f65556db1cdd59835938a8a27 (diff)
downloadserverdata-670d1e4f981344a742deeccf0debd696c8943f0d.tar.gz
serverdata-670d1e4f981344a742deeccf0debd696c8943f0d.tar.bz2
serverdata-670d1e4f981344a742deeccf0debd696c8943f0d.tar.xz
serverdata-670d1e4f981344a742deeccf0debd696c8943f0d.zip
This is a sketch of update script.
In case it is ever needed
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 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");