123456789101112131415161718192021222324252627282930313233343536 |
- #!/bin/sh
- ### Overall revision 6 ###
- # this is a script to compile mplayer
- OLD_VER=`cat /.mplayer/mk_data`
- ### this allows changing the niceness ###
- if [ -n $1 ]; then
- SPEED='-10'
- else
- if echo $1|egrep '^(-[.1-9]|[.1-9])*$'>/dev/null; then
- SPEED=$1
- if [ $1 -gt 20 ]; then
- SPEED='20'
- fi
- if [ $1 -lt -20 ]; then
- SPEED='-20'
- fi
- fi
- fi
- ### end speed changing ###
- NEW_VER=`cat /.mplayer/up_data`
- if [ $OLD_VER != $NEW_VER ]; then
- cd /mplayer/ &&
- sudo nice -n $SPEED ./configure --enable-menu &&
- #--enable-gui &&
- sudo nice -n $SPEED make &&
- growlnotify -m "mplayer compiled" &&
- echo $NEW_VER>/.mplayer/mk_data &&
- cd -
- else
- growlnotify -m "source is the same, not compiling...."
- echo -e "\e[1;31mmplayer's source is the same, not going to compile...\e[m"
- fi
|