

def download(name):
    "\n    Download a named update so that it can be installed later with the\n    ``update`` or ``update_all`` functions\n\n    :param str name: The update to download.\n\n    :return: True if successful, otherwise False\n    :rtype: bool\n\n    CLI Example:\n\n    .. code-block:: bash\n\n       salt '*' softwareupdate.download <update name>\n    "
    if (not update_available(name)):
        raise SaltInvocationError('Update not available: {0}'.format(name))
    if (name in list_downloads()):
        return True
    cmd = ['softwareupdate', '--download', name]
    salt.utils.mac_utils.execute_return_success(cmd)
    return (name in list_downloads())

dataset/ETHPy150Open saltstack/salt/salt/modules/mac_softwareupdate.py download/original