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

8d73a3
#!/bin/bash
8d73a3
#
08abde
# verify_doPackageInstall.sh -- This function receives a list of
08abde
# missing packages and installs them using sudo yum.
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_doPackageInstall {
8d73a3
8d73a3
    # Verify `yum' command existence.
b76c02
    cli_checkFiles '/usr/bin/yum' 'x'
8d73a3
8d73a3
    # Use sudo to install packages in your system through yum.
8d73a3
    sudo yum install ${PACKAGES_MISSING[*]}
8d73a3
8d73a3
}