summaryrefslogtreecommitdiff
path: root/rdiff-backup/testing/chdir-wrapper2
blob: fef40389719eb768b35e8325d91def70115b976a (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.

Like chdir-wrapper, but this time run the 'rdiff-backup' script, not
some other special thing.

"""

import os, sys

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

os.system(os.path.join(olddir, "../rdiff-backup") + " --server")