超low的rpm安装bash脚本
#!/usr/bin/bash
function rpm_install()
{
rpm_n=$1
num=$(rpm -qa $rpm_n|wc -l)
rpm_name=`ls . |grep $rpm_n-[0-9]`
if [ $num -lt 1 ]
then
echo "the rpm $rpm_n is not exixts!"
rpm -ivh $rpm_name --nodeps
else
echo "the rpm $rpm_n is exixts!"
echo "$(rpm -qa $rpm_n)"
fi
}
for m in glibc-common glibc glibc-devel glibc-headers kernel-headers nss-softokn-freebl libgcc libstdc++ libuuid zlib ppl cloog-ppl cloog-ppl-devel mpfr cpp libgomp gcc libstdc++-devel libstdc++-devel gcc-c++ pcre pcre-devel zlib zlib-devel openssl openssl-devel lrzsz;
do
echo "====================================================================="
rpm_install $m
done