blob: 62bc1bc018b9dfee46a7aa2a5db0cb329bbdb2fa (
plain) (
tree)
|
|
#!/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");
|