Blame Scripts/Bash/Functions/Verify/verify_doLinkReport.sh

08abde
#!/bin/bash
08abde
#
08abde
# verify_doLinkReport.sh -- This function outputs information about
08abde
# missing links that need to be installed and a confirmation question
08abde
# for users to accept the installation action. 
08abde
#
9f5f2e
# Copyright (C) 2009-2011 Alain Reguera Delgado
08abde
# 
7cd8e9
# This program is free software; you can redistribute it and/or
7cd8e9
# modify it under the terms of the GNU General Public License as
7cd8e9
# published by the Free Software Foundation; either version 2 of the
7cd8e9
# License, or (at your option) any later version.
08abde
# 
08abde
# This program is distributed in the hope that it will be useful, but
08abde
# WITHOUT ANY WARRANTY; without even the implied warranty of
08abde
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
08abde
# General Public License for more details.
08abde
#
08abde
# You should have received a copy of the GNU General Public License
08abde
# along with this program; if not, write to the Free Software
08abde
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
08abde
# USA.
08abde
# 
08abde
# ----------------------------------------------------------------------
08abde
# $Id$
08abde
# ----------------------------------------------------------------------
08abde
08abde
function verify_doLinkReport {
08abde
08abde
    local LINK=''
08abde
    local LINKS_MISSING_MAX=0
08abde
08abde
    # Define max number of missing links.
08abde
    LINKS_MISSING_MAX=${#LINKS_MISSING[*]}
08abde
08abde
    # Output list header.
08abde
    cli_printMessage "`ngettext "The following link will be installed" \
08abde
        "The following links will be installed" "$LINKS_MISSING_MAX"`:"
08abde
08abde
    # Output list body.
08abde
    for LINK in ${LINKS_MISSING[@]};do
08abde
        cli_printMessage "${LINK}" 'AsResponseLine' 
08abde
    done
08abde
08abde
    # Request confirmation for further link installation.
08abde
    cli_printMessage "`gettext "Do you want to continue"`" 'AsYesOrNoRequestLine'
08abde
08abde
}