Mercurial > mplayer.hg
annotate help_diff.sh @ 6285:0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
author | arpi |
---|---|
date | Mon, 03 Jun 2002 17:48:19 +0000 |
parents | |
children | 17cf4bda6f27 |
rev | line source |
---|---|
6285
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
1 #! /bin/bash |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
2 |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
3 # This script walks through the master (stdin) help/message file, and |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
4 # prints (stdout) only those messages which are missing from the help |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
5 # file given as parameter ($1). |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
6 # |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
7 # Example: help_mp-en.sh help_mp-hu.h < help_mp-en.h > missing.h |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
8 |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
9 curr="x" |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
10 |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
11 while read -r line ; do |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
12 |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
13 if ( echo $line | cut -d ' ' -f 1 | grep '^#define' > /dev/null ); then |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
14 curr=`echo $line | cut -d ' ' -f 2` |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
15 if ( grep "$curr " $1 > /dev/null ); then |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
16 curr="x" |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
17 fi |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
18 else |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
19 if test x"$line" = x; then |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
20 curr="x" |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
21 fi |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
22 fi |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
23 |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
24 if test $curr != "x" ; then |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
25 echo "$line" |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
26 fi |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
27 |
0b73c83bc47f
automatically adding untranslated messages to help_mp.h from english master file
arpi
parents:
diff
changeset
|
28 done < help_mp-en.h |