From 670d1e4f981344a742deeccf0debd696c8943f0d Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 5 Jun 2020 16:43:56 -0300 Subject: This is a sketch of update script. In case it is ever needed --- .gitignore | 1 + template.update.py | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 template.update.py 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"); -- cgit v1.2.3-60-g2f50