mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
copy script from trunk
This commit is contained in:
parent
96228d0daa
commit
a53951a4f5
1 changed files with 27 additions and 0 deletions
27
xwords4/wince/scripts/check_ids.sh
Executable file
27
xwords4/wince/scripts/check_ids.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/sh
|
||||
|
||||
ID_FILE=${ID_FILE:-./strids.h}
|
||||
|
||||
if [ ! -f $ID_FILE ]; then
|
||||
echo "$ID_FILE not found"
|
||||
exit 0;
|
||||
elif [ -z "$1" ]; then
|
||||
echo "usage: <rc file> [<rc file>*]"
|
||||
fi
|
||||
|
||||
while [ -n "$1" ]; do
|
||||
cat $ID_FILE | grep '^# *define.* IDS' \
|
||||
| sed 's/^# *define *\(IDS_.*\) .*$/\1/' \
|
||||
| while read ID; do
|
||||
COUNT=$(grep -w -c $ID $1)
|
||||
if [ 0 -eq "$COUNT" ]; then
|
||||
echo $ID not found in $1
|
||||
elif [ 1 -lt "$COUNT" ]; then
|
||||
echo "$ID found $COUNT times in $1"
|
||||
fi
|
||||
if ! grep -q $ID *.c; then
|
||||
echo $ID not used in any .c file
|
||||
fi
|
||||
done
|
||||
shift
|
||||
done
|
Loading…
Add table
Reference in a new issue