1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #!/bin/sh
- ### Overall revision 6 ###
- # this is a script to quickly print
- # the differnces, or lack there of,
- # in the steps of my mplayer scripts
- #formates version number into something more usable
- UP1=`cat /.mplayer/up_data|sed 's/\([^\ ]\)/\1\_/g'|sed 's/\_$//'`
- MK1=`cat /.mplayer/mk_data|sed 's/\([^\ ]\)/\1\_/g'|sed 's/\_$//'`
- IN1=`cat /.mplayer/in_data|sed 's/\([^\ ]\)/\1\_/g'|sed 's/\_$//'`
- #flag to kill loop
- FLAG="run"
- #the number of chars in
- SPOT=1
- #lenght of the strig
- LENGHT=`cat /.mplayer/up_data|wc -m|sed 's/\ //g'`
- while [ $FLAG == "run" ]; do
- #separates one number out
- UP_HOLD=`echo $UP1|cut -d_ -f $SPOT`
- MK_HOLD=`echo $MK1|cut -d_ -f $SPOT`
- IN_HOLD=`echo $IN1|cut -d_ -f $SPOT`
- #compares that number
- if [ $UP_HOLD != $MK_HOLD -o $UP_HOLD != $IN_HOLD ]; then
- UP_HOLD=`echo $UP_HOLD|sed 's/\(..*\)/\\\\e[4;36m\1\\\\e[m/'`
- fi
- if [ $MK_HOLD != $UP_HOLD -o $MK_HOLD != $IN_HOLD ]; then
- MK_HOLD=`echo $MK_HOLD|sed 's/\(..*\)/\\\\e[32m\1\\\\e[m/'`
- fi
- if [ $IN_HOLD != $UP_HOLD -o $IN_HOLD != $MK_HOLD ]; then
- IN_HOLD=`echo $IN_HOLD|sed 's/\(..*\)/\\\\e[34m\1\\\\e[m/'`
- fi
- #puts the numbers backk together
- UP2=`echo "$UP2$UP_HOLD"`
- MK2=`echo "$MK2$MK_HOLD"`
- IN2=`echo "$IN2$IN_HOLD"`
- #things for the loop
- SPOT=`echo $SPOT + 1 | bc`
- if [ $SPOT -ge $LENGHT ]; then
- FLAG="stop"
- fi
- done
- echo -e "Source's Revision: $UP2"
- echo -e "Compiled Revision: $MK2"
- echo -e "Installed Revision: $IN2"
|