mpch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/sh
  2. ### Overall revision 6 ###
  3. # this is a script to quickly print
  4. # the differnces, or lack there of,
  5. # in the steps of my mplayer scripts
  6. #formates version number into something more usable
  7. UP1=`cat /.mplayer/up_data|sed 's/\([^\ ]\)/\1\_/g'|sed 's/\_$//'`
  8. MK1=`cat /.mplayer/mk_data|sed 's/\([^\ ]\)/\1\_/g'|sed 's/\_$//'`
  9. IN1=`cat /.mplayer/in_data|sed 's/\([^\ ]\)/\1\_/g'|sed 's/\_$//'`
  10. #flag to kill loop
  11. FLAG="run"
  12. #the number of chars in
  13. SPOT=1
  14. #lenght of the strig
  15. LENGHT=`cat /.mplayer/up_data|wc -m|sed 's/\ //g'`
  16. while [ $FLAG == "run" ]; do
  17. #separates one number out
  18. UP_HOLD=`echo $UP1|cut -d_ -f $SPOT`
  19. MK_HOLD=`echo $MK1|cut -d_ -f $SPOT`
  20. IN_HOLD=`echo $IN1|cut -d_ -f $SPOT`
  21. #compares that number
  22. if [ $UP_HOLD != $MK_HOLD -o $UP_HOLD != $IN_HOLD ]; then
  23. UP_HOLD=`echo $UP_HOLD|sed 's/\(..*\)/\\\\e[4;36m\1\\\\e[m/'`
  24. fi
  25. if [ $MK_HOLD != $UP_HOLD -o $MK_HOLD != $IN_HOLD ]; then
  26. MK_HOLD=`echo $MK_HOLD|sed 's/\(..*\)/\\\\e[32m\1\\\\e[m/'`
  27. fi
  28. if [ $IN_HOLD != $UP_HOLD -o $IN_HOLD != $MK_HOLD ]; then
  29. IN_HOLD=`echo $IN_HOLD|sed 's/\(..*\)/\\\\e[34m\1\\\\e[m/'`
  30. fi
  31. #puts the numbers backk together
  32. UP2=`echo "$UP2$UP_HOLD"`
  33. MK2=`echo "$MK2$MK_HOLD"`
  34. IN2=`echo "$IN2$IN_HOLD"`
  35. #things for the loop
  36. SPOT=`echo $SPOT + 1 | bc`
  37. if [ $SPOT -ge $LENGHT ]; then
  38. FLAG="stop"
  39. fi
  40. done
  41. echo -e "Source's Revision: $UP2"
  42. echo -e "Compiled Revision: $MK2"
  43. echo -e "Installed Revision: $IN2"