typo fixes
[mplayer/greg.git] / help / help_diff.sh
blob214d402bb17416aa63efb91af7137ebcdff267de
1 #!/bin/sh
3 # This script walks through the master (stdin) help/message file, and
4 # prints (stdout) only those messages which are missing from the help
5 # file given as parameter ($1).
7 # Example: help_diff.sh help_mp-hu.h < help_mp-en.h > missing.h
9 curr=""
11 while read -r line; do
12 if echo "$line" | grep '^#define' > /dev/null 2>&1; then
13 curr=`echo "$line" | cut -d ' ' -f 2`
14 if grep "^#define $curr[ ]" $1 > /dev/null 2>&1; then
15 curr=""
17 else
18 if [ -z "$line" ]; then
19 curr=""
23 if [ -n "$curr" ]; then
24 echo "$line"
26 done