'Ensure the given binary name exists and links to the expected binary.'

def _sync_symlink(self, binary_name, link_to):

    link_path = os.path.join(self.bin_dir, binary_name)
    link_dest = os.path.join(self.bin_dir, link_to)
    if ((not os.path.exists(link_path)) or (not os.path.islink(link_path)) or (os.path.realpath(link_path) != os.path.realpath(link_dest))):
        if os.path.exists(link_path):
            os.remove(link_path)
        os.symlink(link_to, os.path.join(self.bin_dir, binary_name))
        self.output.append(('Symlinked    %s    to    %s.' % (link_path, link_dest)))
        self.changed = True
