synced with r24386
[mplayer/glamo.git] / help / help_diff.sh
blob2e12951a15b755215ae18dc7801340d40a1cd4c7
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=`printf "%s\n" "$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 printf "%s\n" "$line"
26 done