always filter out lines ending in /

This commit is contained in:
Josh Holtrop 2013-03-10 09:05:50 -04:00
parent b4b433f3b5
commit 8116d64d5c

View File

@ -14,9 +14,7 @@ def main(argv):
if len(args) != 2:
sys.stderr.write('Usage: %s [-n] source destination\n' % argv[0])
return -2
out = sys.stdout
if dry_run:
out = Popen(['grep', '-v', '/$'], stdin=PIPE).stdin
out = Popen(['grep', '-v', '/$'], stdin=PIPE).stdin
cmd = ['rsync', '-av%s' % ('n' if dry_run else ''), '--delete',
'--modify-window=2'] + args
sys.stdout.write(' '.join(cmd) + '\n')