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

8d73a3
#!/bin/bash
8d73a3
#
8d73a3
# verify_doPackageReport.sh -- This function receives one list of
8d73a3
# missing packages and another list of packages from third party
8d73a3
# repository that were marked as missing packages.
8d73a3
#
72c8a5
# Copyright (C) 2009-2011  Alain Reguera Delgado
8d73a3
# 
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.
8d73a3
# 
8d73a3
# This program is distributed in the hope that it will be useful, but
8d73a3
# WITHOUT ANY WARRANTY; without even the implied warranty of
8d73a3
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
8d73a3
# General Public License for more details.
8d73a3
#
8d73a3
# You should have received a copy of the GNU General Public License
8d73a3
# along with this program; if not, write to the Free Software
8d73a3
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
8d73a3
# USA.
8d73a3
# 
8d73a3
# ----------------------------------------------------------------------
8d73a3
# $Id$
8d73a3
# ----------------------------------------------------------------------
8d73a3
8d73a3
function verify_doPackageReport {
8d73a3
8d73a3
    local PACKAGE=''
8d73a3
    local WARNING=''
8d73a3
8d73a3
    cli_printMessage "`ngettext "The following package needs to be installed" \
8d73a3
        "The following packages need to be installed" \
8d73a3
        "$PACKAGES_COUNT"`:"
8d73a3
8d73a3
    for PACKAGE in ${PACKAGES_MISSING[@]};do
8d73a3
8d73a3
        # Is this package from third party?
8d73a3
        if [[ $PACKAGE =~ $PACKAGES_THIRD_REGEX ]];then
8d73a3
            WARNING=" (`gettext "requires third party repository!"`)"
8d73a3
        fi
8d73a3
8d73a3
        cli_printMessage "${PACKAGE}${WARNING}" 'AsResponseLine'
8d73a3
        
8d73a3
    done
8d73a3
8d73a3
    cli_printMessage "`gettext "Do you want to continue"`" 'AsYesOrNoRequestLine'
8d73a3
8d73a3
}