Mercurial > mplayer.hg
annotate help_diff.sh @ 6324:2d1528bfd865
*** empty log message ***
author | jaf |
---|---|
date | Fri, 07 Jun 2002 12:46:14 +0000 |
parents | 7336fdaff773 |
children | b54d7fd6471a |
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 # |
6288 | 7 # Example: help_diff.sh help_mp-hu.h < help_mp-en.h > missing.h |
6285
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` |
6288 | 15 if ( grep " $curr " $1 > /dev/null ); then |
6285
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 |
6286 | 28 done |