Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3498690
  • 博文数量: 534
  • 博客积分: 11595
  • 博客等级: 上将
  • 技术积分: 5785
  • 用 户 组: 普通用户
  • 注册时间: 2006-12-22 17:00
文章分类

全部博文(534)

文章存档

2015年(4)

2014年(27)

2013年(15)

2012年(38)

2011年(36)

2010年(85)

2009年(63)

2008年(142)

2007年(124)

分类: LINUX

2007-07-23 15:40:58

以下脚本在fedora core1 和 AS4系统测试上通过, 在fedora core3版本以上就不能通过了.  如有知道原的帮忙留言说一下.
 
#!/bin/sh
 
#define macro
CODECS=/usr/lib/codecs
WIN32=/usr/lib/win32
MPLAYER=/usr/local/mplayer
MPSKIN=$MPLAYER/share/mplayer/Skin/default
MPFONT=$MPLAYER/share/mplayer/font
SYSFONT=/usr/share/fonts/zh_CN/TrueType
MPARGUMENT='--prefix=/usr/local/mplayer --enable-gui --enable-largefiles --enable-dynamic-plugins --with-codecsdir=/usr/lib/codecs --with-win32libdir=/usr/lib/win32 --language=zh_CN'
 
# define funtion testerr and banner
testerr() {
 if [ $? -ne 0 ] ; then
  echo "error"
  exit 1
 fi
}
banner() {
 echo
 echo -n "#################################"
 echo
}
banner
echo "testerr and banner is running"
 
# compare kernel version
KVER=`uname -r | awk -F- '{print $1}' | cut -c -3`
if [ "$KVER" = '2.6' ] ; then
        rpm -ivh glib-devel-1.2.10-11.i386.rpm --nodeps  2>errlog
        rpm -ivh gtk+-devel-1.2.10-28.1.i386.rpm --nodeps  2>>errlog
 banner
 echo "glib-devel and gtd+devel already installed"
fi
 
# uncompress files
for I in *.bz2 ; do
 tar -jxf $I
done
testerr
echo "uncompress bz2 ok"
banner
 
# move folder to /usr/lib/
[ -d $CODECS ] || mv essential-20050412 $CODECS
testerr
echo "move codecs success!"
banner
[ -d $WIN32 ] || mv all-20050412 $WIN32
testerr
echo "move win32 success!"
banner
 
# cd Mplayer Directory
cd "MPlayer-1.0pre7try2"
testerr
 
# create Makefile
./configure $MPARGUMENT >/dev/null 2>>errlog #&& make 2>>errlog && make install >>errlog
testerr
echo "create Makefile ok"
banner
 
# make
make >/dev/null 2>>errlog
testerr
echo "make ok"
banner
 
# install mplayer
make install >/dev/null 2>>errlog
testerr
echo "make install ok"
banner
 
# move last directory
cd ..
testerr
banner
echo "cd .."
banner
 
# move Skin folder
[ -d $MPSKIN ] || mv plastic $MPSKIN 2>>errlog
testerr
echo "mv plastic ok"
banner
 
# copy font folder
[ -d $MPFONT ] && cp -rf font-arial-iso-8859-1/font-arial-14-iso-8859-1/* $MPFONT 2>>errlog
testerr
echo "cp font ok"
banner
 
# create symbol links gmplayer
[ -L /usr/bin/gmplayer ] || ln -s $MPLAYER/bin/gmplayer /usr/bin/gmplayer 2>>errlog
testerr
echo "create symbolic link gmplayer ok"
banner
 
# start gmplayer
echo "mplayer install sucessfully!"
banner
gmplayer &
sleep 1
 
# create subfont.ttf file
[ -f ~/.mplayer/subfont.ttf ] || cp $SYSFONT/gkai00mp.ttf ~/.mplayer/subfont.ttf 2>>errlog
testerr
echo "create subfont.ttf ok"
banner
阅读(2653) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~