scripts/mplayer_update.sh

58 lines
2 KiB
Bash
Raw Normal View History

2014-09-13 22:39:44 +02:00
#!/usr/bin/bash
2014-09-13 21:23:13 +02:00
#######################################
# mplayer_update.sh
#######################################
# get currebt FFmpeg's & MPlayer's CVS
# snapshots and compile them
# to put in crontab early in the
# morning (about 6:00 AM)
#######################################
# t<>l<EFBFBD>charge les snapshots CVS de
# FFmpeg & MPlayer et les compile
# <20> mettre dans la crontab t<>t le
# matin (<28> 6 heures environ)
#######################################
export MPLAYER_DIR=MPlayer-`date +"%Y%m%d"`
export FFMPEG_ARCHIVE=ffmpeg-`date +"%d%m%y" --date '1 day ago'`-cvs.tar.gz
export LOGFILE=/tmp/mplayer_update.log
cd /tmp
echo ------------------------------t<>l<EFBFBD>chargement des sources------------------------->$LOGFILE
echo >>$LOGFILE
wget -nv ftp://ftp1.mplayerhq.hu/MPlayer/cvs/MPlayer-current.tar.bz2 >/dev/null 2>>$LOGFILE
wget -nv http://www.tinkerland.org.uk/cvs-snapshots/current/$FFMPEG_ARCHIVE >/dev/null 2>>$LOGFILE
tar xfjv MPlayer-current.tar.bz2 >/dev/null 2>>$LOGFILE
tar zxvf $FFMPEG_ARCHIVE >/dev/null 2>>$LOGFILE
rm -f /tmp/MPlayer-current.tar.bz2
rm -f /tmp/$FFMPEG_ARCHIVE
echo >>$LOGFILE
echo ------------------------------installation FFmpeg-------------------------------->>$LOGFILE
echo >>$LOGFILE
cd ffmpeg
./configure >>$LOGFILE
make >/dev/null 2>>$LOGFILE
make install >>$LOGFILE
cd ../$MPLAYER_DIR
rm -Rf libavcodec
cp -R ../ffmpeg/libavcodec .
echo >>$LOGFILE
echo ------------------------------installation MPlayer------------------------------->>$LOGFILE
echo >>$LOGFILE
# <20> customiser suivant la configuration
./configure --language=fr --enable-gui --enable-new-conf --enable-menu --enable-qtx-codecs --enable-live --enable-xmms --with-xanimlibdir=/usr/X11R6/lib/xanim >>$LOGFILE
make >/dev/null 2>>$LOGFILE
make install >>$LOGFILE
#cp DOCS/French/mplayer.1 /usr/local/man/fr/man1/
cp DOCS/French/*.html /usr/local/doc/mplayer/
cd ..
rm -Rf /tmp/$MPLAYER_DIR
rm -Rf /tmp/ffmpeg
#envoyer le r<>sultat <20> l'utilisateur n
mail -s "Rapport de compilation MPlayer" n <$LOGFILE