comparison 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
comparison
equal deleted inserted replaced
6284:30a2f1807c5b 6285:0b73c83bc47f
1 #! /bin/bash
2
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).
6 #
7 # Example: help_mp-en.sh help_mp-hu.h < help_mp-en.h > missing.h
8
9 curr="x"
10
11 while read -r line ; do
12
13 if ( echo $line | cut -d ' ' -f 1 | grep '^#define' > /dev/null ); then
14 curr=`echo $line | cut -d ' ' -f 2`
15 if ( grep "$curr " $1 > /dev/null ); then
16 curr="x"
17 fi
18 else
19 if test x"$line" = x; then
20 curr="x"
21 fi
22 fi
23
24 if test $curr != "x" ; then
25 echo "$line"
26 fi
27
28 done < help_mp-en.h