[AD] improved findtext.sh |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Current 'misc/findtext.sh mytext.cfg' reports any string that is used in
a call to get_config_text() but not in mytext.cfg, as well as any string
that is in mytext.cfg but not used by an get_config_text(). This patch
makes it distinguish these cases.
--
Sven
Index: misc/findtext.sh
===================================================================
RCS file: /cvsroot/alleg/allegro/misc/findtext.sh,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 findtext.sh
--- misc/findtext.sh 14 May 2000 20:16:49 -0000 1.1.1.1
+++ misc/findtext.sh 10 Jul 2003 19:49:01 -0000
@@ -27,9 +27,15 @@
if [ $# -gt 0 ]; then
echo "Comparing entext.cfg with $1..."
- sed -e "s/=.*//" -e "s/ //" entext.cfg $1 | \
- sort | \
- uniq -u
+ en=`mktemp findtext.XXXXXX`
+ nat=`mktemp findtext.XXXXXX`
+ sed -e "s/=.*//" -e "s/ //" entext.cfg | sort > $en
+ sed -e "s/=.*//" -e "s/ //" $1 | sort > $nat
+ echo "-------- Missing Texts --------"
+ comm -2 -3 $en $nat
+ echo "-------- Possibly Unused Texts --------"
+ comm -1 -3 $en $nat
+ rm $en $nat
else
echo "Translation strings written into entext.cfg"
fi