From fdc04fe64eed1212755e50bdaf82fdd4b55e2e08 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Thu, 4 Apr 2013 18:43:35 +0100 Subject: [PATCH] Push index to server last --- fdroidserver/server.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fdroidserver/server.py b/fdroidserver/server.py index 1d67a4e8..e9753989 100644 --- a/fdroidserver/server.py +++ b/fdroidserver/server.py @@ -41,8 +41,14 @@ def main(): print "The only command currently supported is 'update'" sys.exit(1) - sys.exit(subprocess.call(['rsync', - '-u', '-v', '-r', '--delete', 'repo', serverwebroot])) + if subprocess.call(['rsync', '-u', '-v', '-r', '--delete', '--exclude', 'repo/index.xml', '--exclude', 'repo/index.jar', 'repo', serverwebroot]) != 0: + sys.exit(1) + if subprocess.call(['rsync', '-u', '-v', '-r', '--delete', 'repo/index.xml', serverwebroot + '/repo']) != 0: + sys.exit(1) + if subprocess.call(['rsync', '-u', '-v', '-r', '--delete', 'repo/index.jar', serverwebroot + '/repo']) != 0: + sys.exit(1) + + sys.exit(0) if __name__ == "__main__": main()