'Copies the |source| Info.plist to the destination directory |dest|.'

def ExecCopyInfoPlist(self, source, dest, convert_to_binary, *keys):

    fd = open(source, 'r')
    lines = fd.read()
    fd.close()
    plist = plistlib.readPlistFromString(lines)
    if keys:
        plist = dict((plist.items() + json.loads(keys[0]).items()))
    lines = plistlib.writePlistToString(plist)
    IDENT_RE = re.compile('[/\\s]')
    for key in os.environ:
        if key.startswith('_'):
            continue
        evar = ('${%s}' % key)
        evalue = os.environ[key]
        lines = string.replace(lines, evar, evalue)
        evar = ('${%s:identifier}' % key)
        evalue = IDENT_RE.sub('_', os.environ[key])
        lines = string.replace(lines, evar, evalue)
        evar = ('${%s:rfc1034identifier}' % key)
        evalue = IDENT_RE.sub('-', os.environ[key])
        lines = string.replace(lines, evar, evalue)
    lines = lines.split('\n')
    for i in range(len(lines)):
        if lines[i].strip().startswith('<string>${'):
            lines[i] = None
            lines[(i - 1)] = None
    lines = '\n'.join(filter((lambda x: (x is not None)), lines))
    fd = open(dest, 'w')
    fd.write(lines)
    fd.close()
    self._WritePkgInfo(dest)
    if (convert_to_binary == 'True'):
        self._ConvertToBinary(dest)
