[MPlayer-dev-eng] [PATCH] Improvement to help/help_diff.sh
Torinthiel
torinthiel at megapolis.pl
Sun Feb 27 12:43:11 CET 2005
A recent commit has revealed to me a small issue with help/help_diff.sh
suppose one adds a line
#define MSGTR_FOO "Sometext"
to help/help_mp-en.h masterfile
help_diff.sh is supposed to add this line to help_mp.h until someone
syncs the translation, to make sure everything is defined properly.
Unfortunatelly it fails to do so if the translation contains the line
#define MSGTR_FOO2 "Sometekst"
as it searches for '#define MSGTR_FOO' pattern and the second line
matches this pattern. A small patch attached makes help_diff.sh match
also space/tab terminating this pattern, fixing the issue.
I'll apply in a few days if nobody objects.
Torinthiel
--
Waclaw "Torinthiel" Schiller GG#: 542916, 3073512
torinthiel(at)megapolis(dot)pl
gpg: B06901F1 fpr: FAA3 559F CAE9 34DE CDC8 7346 2B6E 39F2 B069 01F1
"No classmates may be used during this examination"
-------------- next part --------------
Index: help/help_diff.sh
===================================================================
RCS file: /cvsroot/mplayer/main/help/help_diff.sh,v
retrieving revision 1.8
diff -u -r1.8 help_diff.sh
--- help/help_diff.sh 17 Aug 2003 20:17:03 -0000 1.8
+++ help/help_diff.sh 27 Feb 2005 11:35:27 -0000
@@ -11,7 +11,7 @@
while read -r line; do
if echo "$line" | grep '^#define' > /dev/null 2>&1; then
curr=`echo "$line" | cut -d ' ' -f 2`
- if grep "^#define $curr" $1 > /dev/null 2>&1; then
+ if grep "^#define $curr[ ]" $1 > /dev/null 2>&1; then
curr=""
fi
else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050227/6890062e/attachment.pgp>
More information about the MPlayer-dev-eng
mailing list