if [ ! -f x264-20090704.tar.bz2 ]; then if [ ! -d x264 ]; then git clone git://git.videolan.org/x264.git else (cd x264 && git pull ) fi [ -d x264-20090704 ] || mkdir x264-20090704 (cd x264 && tar cf - . | (cd ../x264-20090704 && tar xf -) ) tar cvjf x264-20090704.tar.bz2 x264-20090704 else tar xvjf x264-20090704.tar.bz2 fi