summaryrefslogtreecommitdiff
path: root/rdiff-backup/testing/chdir-wrapper
blob: ff0155fdbab64ce6dfaadee80d9569f07e8771e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python

"""Used to emulate a remote connection by changing directories.

If given an argument, will change to that directory, and then start
the server.  Otherwise will start the server without a chdir.

"""

import os, sys

olddir = os.getcwd()
if len(sys.argv) > 1: os.chdir(sys.argv[1])
#PipeConnection(sys.stdin, sys.stdout).Server()

#os.system("/home/ben/prog/python/rdiff-backup/rdiff-backup --server")
#os.system("/home/ben/prog/rdiff-backup/server.py /home/ben/prog/python/rdiff-backup/src")
os.system("%s/server.py" % (olddir,))