'Synchronize the local and remote directories, and the
relevant `Campaign`s.'

def sync(self):

    subprocess.call((self.rsync + ['-a', self.get_local_path('input'), self.get_local_path('remoteinput')]))
    subprocess.call((self.rsync + ['-a', '--remove-source-files', self.get_local_path('input'), self.get_remote_path('input')]))
    subprocess.call((self.rsync + ['-a', '--delete', self.get_remote_path('input'), self.get_local_path('remoteinput')]))
    subprocess.call((self.rsync + ['-a', '--delete', self.get_remote_path('cur'), self.get_local_path('remotecur')]))
    subprocess.call((self.rsync + ['-a', '--remove-source-files', self.get_remote_path('output'), self.get_local_path('remoteoutput')]))
    for campaign in self.campaigns:
        campaign.sync(self)
