#/bin/bash
#RedHat Fedora Core 5自动配置脚本,添加多媒体格式的支持,优化字体,自动安装显卡驱动,安装常用软件。
#创建日期:2006.8.2
#创建人:hillwood
#版本:1.0.2
#2006.7.22第一次发布,8月1日1.0.1版修正bug,8月2日1.0.2版修正bug
echo "开始导入yum仓库"
cd /etc/yum.repos.d
wget http://linux-vbird.3322.org/FC5/atrpms.repo
wget http://linux-vbird.3322.org/FC5/dries.repo
wget http://linux-vbird.3322.org/FC5/jpackage.repo
wget http://linux-vbird.3322.org/FC5/kde-redhat.repo
wget http://linux-vbird.3322.org/FC5/newrpms.repo
wget http://linux-vbird.3322.org/FC5/flash.repo
wget http://gstreamer.freedesktop.org/download/gstreamer-0.10-deps.repo
wget http://gstreamer.freedesktop.org/download/gstreamer-0.10-gst.repo
wget http://gstreamer.freedesktop.org/download/gstreamer-0.10-apps.repo
wget http://thomas.apestaart.org/pkg/thomas.pubkey
wget http://thomas.apestaart.org/pkg/thomas.fingerprint
rpm --import http://freshrpms.net/packages/RPM-GPG-KEY.txt
rpm --import http://dries.ulyssis.org/rpm/RPM-GPG-KEY.dries.txt
rpm --import http://newrpms.sunsite.dk/gpg-pubkey-newrpms.txt
rpm --import /usr/share/doc/fedora-release-*/*GPG-KEY*
gpg --with-fingerprint thomas.pubkey | head -n 3 | diff - thomas.fingerprint
gpg --keyserver pgp.mit.edu --recv-keys 55f3aa6f
gpg --list-keys | grep Stichele
gpg --fingerprint 55f3aa6f | head -n 3 > thomas.fingerprint.tmp
diff thomas.fingerprint.tmp thomas.fingerprint
rpm --import thomas.pubkey
echo "开始安装gstreamer解码器,完成后你可以使用RhythmBox播放mp3、wma和aac等格式的音乐了"
yum install gstreamer-universe
yum -y install ffmpeg
yum -y install mjpegtools
echo "gstreamer解码器安装完成,开始安装mplayer"
yum -y install mplayer-gui
yum -y install mplayerplug-in
wget http://packman.iu-bremen.de/suse/10.1/i586/w32codec-all-20060611-0.pm.0.i586.rpm
rpm -ivh w32codec-all-20060611-0.pm.0.i586.rpm
rm -rf w32codec-all-20060611-0.pm.0.i586.rpm
echo "mplayer安装完成,开始安装方正宋体"
cd /usr/share/fonts/chinese/TrueType
wget http://linux-vbird.3322.org/FC5/FZSongTi.ttf
echo "方正宋体安装完成,开始安装可选软件"
echo "你要安装nvidia显卡驱动吗?是请输入y,否请输入n"
read yn
if [ "$yn" = "y" ] || [ "$yn" = "Y" ]; then
echo "开始安装nvidia显卡驱动"
yum install xorg-x11-drv-nvidia kmod-nvidia
echo "安装结束,请修改/etc/X11/xorg.conf文件并重启电脑应用之"
else
echo "安装被取消"
fi
echo "你要安装ATI显卡驱动吗?是请输入y,否请输入n"
read yn
if [ "$yn" = "y" ] || [ "$yn" = "Y" ]; then
echo "开始安装ATI显卡驱动"
yum -y install xorg-x11-drv-fglrx kmod-fglrx
echo "安装结束,请修改/etc/X11/xorg.conf文件并重启电脑应用之"
else
echo "安装被取消"
fi
echo "你要安装Audacious音乐播放器吗?是请输入y,否请输入n”
read yn
if [ "$yn" = "y" ] || [ "$yn" = "Y" ]; then
echo "开始安装Audacious”
yum -y install audacious
echo "安装完成”
else
echo "安装被取消"
fi
echo "你要安装amaroK音乐播放器吗?是请输入y,否请输入n”
read yn
if [ "$yn" = "y" ] || [ "$yn" = "Y" ]; then
echo "开始安装amaroK"
yum -y install amarok
echo "安装完成"
else
echo "安装被取消"
fi
echo "你要安装Realplayer 10吗?是请输入y,否请输入n"
read yn
if [ "$yn" = "y" ] || [ "$yn" = "Y" ]; then
echo "开始安装Realplayer 10"
cd /root
wget http://software-dl.real.com/22c6cf0036c94c520d05/unix/RealPlayer10GOLD.rpm
yum -y install compat-libstdc++-33
rpm -ivh RealPlayer10GOLD.rpm
rm -rf RealPlayer10GOLD.rpm
echo "安装完成"
else
echo "安装被取消"
fi
echo "你要安装Totem-xine吗?Totem-xine可以支持更多的格式,是请输入y,否请输入n"
read yn
if [ "$yn" = "y" ] || [ "$yn" = "Y" ]; then
echo "开始安装totem-xine"
yum -y install totem-xine
echo "安装完成"
else
echo "安装被取消"
fi
echo "安装全部完成"