Download a named update so that it can be installed later with the
    ``update`` or ``update_all`` functions

    :param str name: The update to download.

    :return: True if successful, otherwise False
    :rtype: bool

    CLI Example:

    .. code-block:: bash

       salt '*' softwareupdate.download <update name>

def download(name):
    '''
    Download a named update so that it can be installed later with the
    ``update`` or ``update_all`` functions

    :param str name: The update to download.

    :return: True if successful, otherwise False
    :rtype: bool

    CLI Example:

    .. code-block:: bash

       salt '*' softwareupdate.download <update name>
    '''
    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()