#!/bin/bash # this no brain script tries to get ffmpeg from cvs # and it tries to "patch" the build files if [ -d "ffmpeg" ] then echo "FFmpeg build tree found" exit 0 fi if [ ! -d "ffmpeg" ] then echo "FFmpeg build tree not found" mkdir ffmpeg cd ffmpeg fi MAKEFILE_TEMPL="SUBDIRS =\n\ DIST_SUBDIRS = ffmpeg\n\ EXTRA_DIST = configure.gnu Makefile.gnu\n\ DISTCLEANFILES=\n\ MAINTAINERCLEANFILES=\n\ all-local:\n\ \tcd ffmpeg && make -f Makefile.gnu\n" if [ ! -d "ffmpeg" ] then echo "Trying to get FFmpeg from cvs" if cvs -d:pserver:anonymous@mplayerhq.hu:/cvsroot/ffmpeg co ffmpeg then # dump Makefile.am echo -e $MAKEFILE_TEMPL > Makefile.am cd ffmpeg # prepare configure for update mv configure configure.gnu.in # update the expression for finding ffmpeg's source tree cat configure.gnu.in | sed -e 's/configure##/configure.gnu##/g' > configure.gnu.tmp # for some reason beoss audio is enabled by default ? cat configure.gnu.tmp | sed -e 's/^audio_beos=\"yes\"/audio_beos=\"no\"/g' > configure.gnu.in cat configure.gnu.in | sed -e 's/extralibs=\"\$extralibs -lbe -lmedia\"/extralibs=\"\$extralibs\"/g' > configure.gnu # remove tempfile rm configure.gnu.tmp rm configure.gnu.in # set execution bit chmod +x configure.gnu # rename Makefile mv Makefile Makefile.gnu echo "FFmpeg build setup completed" else echo "Unable to grab FFmpeg from CVS" fi fi