Script compile kdenlive ffmpeg mlt mlt++ for kubuntu 9.04

this script download and install erverything, but it doesn't install dependeces.. you have to see here for that
http://www.nowardev.netsons.org/?q=node/32

save as you want
- chmod +x nameofscritp
- sudo ./nameofscritp

#!/bin/bash

outfolder=$PWD/kdenlivesvn

if [ "$(id -u)" = 0 ]; then
echo "you have the power lol"
echo "installing..."
else
echo "YOU ARE NOT ROOT TO INSTALL YOU MUST BE ROOT. "
echo "have you typed wrong password?"
exit 0
fi

#ìRemove the old folder
if [[ -e $outfolder ]]; then
echo "it seems you have already compiled.Do you want delete old stuff?(y\n)"
echo
read
case $REPLY in y|Y|yes|Yes|YEs|YES) rm -R "$outfolder" ;; n|N|no|No|NO) exit 1 ;; esac

fi

functionmenu(){
echo "how many cores do you have "
echo
echo "if you have dual core cpu you can compile faster.. "
echo "for example if you have dual core... make -j(n+1)"
echo "make -j3 "
echo ""
echo ""
echo "1 default"
echo "2 dual core"
echo "4 quad core"
echo "8 oct core"
echo "16 core LOL-LOL"
echo ""
}

functionmain(){
core=$(($REPLY+1))

echo

#
mkdir kdenlivesvn; cd kdenlivesvn
svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
cd ffmpeg
./configure --prefix=/usr --enable-shared --enable-libmp3lame --enable-gpl --enable-libfaad --enable-libvorbis --enable-pthreads --enable-libfaac --enable-libxvid --enable-postproc --enable-x11grab --enable-libgsm --enable-libx264 --enable-libtheora --enable-libdc1394 --enable-nonfree --disable-stripping --enable-avfilter --enable-libdirac --disable-decoder=libdirac --enable-libschroedinger --disable-encoder=libschroedinger --enable-avfilter-lavf --enable-libamr-nb --enable-libamr-wb
make -j$core
make install
cd ..
svn co https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt mlt
cd mlt
./configure --prefix=/usr --enable-gpl --qimage-libdir=/usr/lib/ --qimage-includedir=/usr/include/qt4 --avformat-swscale
make -j$core
make install
cd ..
svn co https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++ mlt++
cd mlt++ ;./configure --prefix=/usr ;make ;sudo make install ;cd ..
svn co https://kdenlive.svn.sourceforge.net/svnroot/kdenlive/trunk/kdenlive
cd kdenlive
mkdir build; cd build; cmake .. -DCMAKE_INSTALL_PREFIX=/usr; make -j$core
make install
}

functionmenu

read
if [[ -z $REPLY ]] ; then

functionmain 1
else
echo "compiling with $REPLY core "
functionmain $REPLY

fi