Blame Scripts/Bash/Cli/Functions/Verify/verify_doPackages.sh

4c79b5
#!/bin/bash
4c79b5
#
644d20
# verify_doPackages.sh -- This function verifies required packages
644d20
# your workstation needs in order to run the centos-art command
644d20
# correctly. If there are missing packages, the `centos-art.sh' script
644d20
# asks you to confirm their installation. When installing packages,
644d20
# the `centos-art.sh' script uses the yum application in order to
644d20
# achieve the task.
4c79b5
#
9f5f2e
# Copyright (C) 2009-2011 Alain Reguera Delgado
4c79b5
# 
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.
4c79b5
# 
4c79b5
# This program is distributed in the hope that it will be useful, but
4c79b5
# WITHOUT ANY WARRANTY; without even the implied warranty of
4c79b5
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4c79b5
# General Public License for more details.
4c79b5
#
4c79b5
# You should have received a copy of the GNU General Public License
4c79b5
# along with this program; if not, write to the Free Software
4c79b5
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
4c79b5
# USA.
4c79b5
# 
4c79b5
# ----------------------------------------------------------------------
3b853a
# $Id$
4c79b5
# ----------------------------------------------------------------------
4c79b5
644d20
function verify_doPackages {
4c79b5
4c79b5
    local PACKAGES=''
558b58
    local PACKAGES_THIRD_FLAG_FILTER=''
8d73a3
    local -a PACKAGES_MISSING
8d73a3
    local PACKAGES_COUNT=0
4c79b5
4c79b5
    # Define required packages needed by centos-art.sh script.
4c79b5
    PACKAGES="bash inkscape ImageMagick netpbm netpbm-progs
4c79b5
        syslinux gimp coreutils texinfo info tetex-latex tetex-fonts
8d73a3
        tetex-doc tetex-xdvi tetex-dvips gettext texi2html"
4c79b5
4c79b5
    # Define, from required packages, packages being from third
644d20
    # parties (i.e., packages not included in CentOS [base]
4c79b5
    # repository.).
558b58
    PACKAGES_THIRD_FLAG_FILTER="(inkscape|blender)"
4c79b5
644d20
    verify_doPackageCheck
644d20
    verify_doPackageReport
8d73a3
    verify_doPackageInstall
8d73a3
8d73a3
    # At this point we need to recheck installed packages in order to
8d73a3
    # be sure the user decided not to continue when there are still
8d73a3
    # missing packages to be install.  For example this may happen
8d73a3
    # when we try to install third party packages and there is no
8d73a3
    # third party repository availabe to get those packages from.
8d73a3
    verify_doPackages
3b853a
4c79b5
}