|
|
8d73a3 |
#!/bin/bash
|
|
|
8d73a3 |
#
|
|
|
08abde |
# verify_doPackageInstall.sh -- This function receives a list of
|
|
|
08abde |
# missing packages and installs them using sudo yum.
|
|
|
8d73a3 |
#
|
|
|
8d73a3 |
# Copyright (C) 2009-2010 Alain Reguera Delgado
|
|
|
8d73a3 |
#
|
|
|
8d73a3 |
# This program is free software; you can redistribute it and/or modify
|
|
|
8d73a3 |
# it under the terms of the GNU General Public License as published by
|
|
|
8d73a3 |
# the Free Software Foundation; either version 2 of the License, or
|
|
|
8d73a3 |
# (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.
|
|
|
8d73a3 |
cli_checkFiles '/usr/bin/yum' 'f' '' '--quiet'
|
|
|
8d73a3 |
if [[ $? -ne 0 ]];then
|
|
|
8d73a3 |
cli_printMessage "`gettext "The yum package manager is not installed."`"
|
|
|
8d73a3 |
cli_printMessage "$(caller)" 'AsToKnowMoreLine'
|
|
|
8d73a3 |
fi
|
|
|
8d73a3 |
|
|
|
8d73a3 |
# Use sudo to install packages in your system through yum.
|
|
|
8d73a3 |
sudo yum install ${PACKAGES_MISSING[*]}
|
|
|
8d73a3 |
|
|
|
8d73a3 |
}
|