From 601f4c5a4be6f5a52b56fd8620faf765b63b1a07 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 28 Jul 2009 11:57:27 +0200 Subject: Install yum-utils when yumdownloader is missing first in stapprep.sh. * doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh: Check whether yumdownloader is already available and install yum-utils if not. --- doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/SystemTap_Beginners_Guide') diff --git a/doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh b/doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh index 6905c9cc..3c6bf785 100755 --- a/doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh +++ b/doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh @@ -26,6 +26,10 @@ if [ "$NEEDED" != "" ]; then echo -e "Need to install the following packages:\n$NEEDED" if [ `id -u` = "0" ]; then #attempt download and install DIR=`mktemp -d` || exit 1 + if [ ! -x /usr/bin/yumdownloader ]; then + echo "Need to first install yum-utils for yumdownloader" + yum install -y yum-utils + fi yumdownloader --enablerepo="*debuginfo*" $NEEDED --destdir=$DIR check_error $? "problem downloading rpm(s) $NEEDED" rpm --force -ivh $DIR/*.rpm -- cgit