#!/bin/bash
#the package name is listed in the fc8-packages.txt
for LINE in `cat fc8-packages.txt`
do
 rpm -qa | grep $LINE > /tmp/results.log
 if [ `cat /tmp/results.log | wc -l` -eq 0 ]; then
     echo "WARNING: $LINE is not found"
     echo "now installing it....."
            yum install $LINE
 else
     echo "$LINE is installed"
 fi
donerm -rf /tmp/results.log