scripts/mplayer_update.sh
2014-09-13 22:39:44 +02:00

57 lines
2 KiB
Bash

#!/usr/bin/bash
#######################################
# 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écharge les snapshots CVS de
# FFmpeg & MPlayer et les compile
# à mettre dans la crontab tôt le
# matin (à 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é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
# à 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 à l'utilisateur n
mail -s "Rapport de compilation MPlayer" n <$LOGFILE