diff options
author | William Cohen <wcohen@redhat.com> | 2008-11-04 16:51:15 -0500 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2008-11-04 16:51:15 -0500 |
commit | ca8bf77efd8ec9de7b8cf746d3ecd14c91a1346c (patch) | |
tree | 0e9139af1c56ffa833148e5ffbd51e7aca991a9a /doc/SystemTap_Beginners_Guide/en-US/extras | |
parent | 32d90014f31354a1c384a00905fa62cfd4b5dfe8 (diff) | |
download | systemtap-steved-ca8bf77efd8ec9de7b8cf746d3ecd14c91a1346c.tar.gz systemtap-steved-ca8bf77efd8ec9de7b8cf746d3ecd14c91a1346c.tar.xz systemtap-steved-ca8bf77efd8ec9de7b8cf746d3ecd14c91a1346c.zip |
Clean up formatting. Publican does not deal with tabs.
Diffstat (limited to 'doc/SystemTap_Beginners_Guide/en-US/extras')
-rwxr-xr-x | doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh b/doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh index 1b2d3f14..6905c9cc 100755 --- a/doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh +++ b/doc/SystemTap_Beginners_Guide/en-US/extras/stapprep.sh @@ -16,19 +16,20 @@ for VARIANT in debug kdump PAE xen; do done KERN_ARCH=`uname -m` KERN_REV=`echo $UNAME | sed s/.$KERN_ARCH//` # strip arch from uname -CANDIDATES="$KERNEL-$KERN_REV.$KERN_ARCH $KERNEL-devel-$KERN_REV.$KERN_ARCH \ -$KERNEL-debuginfo-$KERN_REV.$KERN_ARCH \ -kernel-debuginfo-common-$KERN_REV.$KERN_ARCH" -NEEDED=`rpm --qf "%{name}-%{version}-%{release}.%{arch}\n" -q $CANDIDATES | \ - grep "is not installed" | awk '{print $2}'` +CANDIDATES="$KERNEL-$KERN_REV.$KERN_ARCH \ + $KERNEL-devel-$KERN_REV.$KERN_ARCH \ + $KERNEL-debuginfo-$KERN_REV.$KERN_ARCH \ + kernel-debuginfo-common-$KERN_REV.$KERN_ARCH" +NEEDED=`rpm --qf "%{name}-%{version}-%{release}.%{arch}\n" \ + -q $CANDIDATES | grep "is not installed" | awk '{print $2}'` 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 - yumdownloader --enablerepo="*debuginfo*" $NEEDED --destdir=$DIR - check_error $? "problem downloading rpm(s) $NEEDED" - rpm --force -ivh $DIR/*.rpm - check_error $? "problem installing rpm(s) $NEEDED" - rm -r $DIR #cleanup + DIR=`mktemp -d` || exit 1 + yumdownloader --enablerepo="*debuginfo*" $NEEDED --destdir=$DIR + check_error $? "problem downloading rpm(s) $NEEDED" + rpm --force -ivh $DIR/*.rpm + check_error $? "problem installing rpm(s) $NEEDED" + rm -r $DIR #cleanup fi fi |