summaryrefslogtreecommitdiffstats
path: root/po/create_placeholder
blob: be7ed316e8d6c70d8a4fa114107dd85dc648e07f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

cd ..
echo -e "\
/* this is a placeholder so that xgettext can find the translatable
 * strings. This file is automatically generated, look at
 * po/create_placeholder
 */
char *foobar[] = { " > placeholder.h.$$
cat `grep -v placeholder.h po/POTFILES.in` | \
	grep '$ECHO ".*"' | \
	sed 's/^.*$ECHO \(".*"\)/N_(\1),/g' >> placeholder.h.$$

for i in `grep -v placeholder.h po/POTFILES.in`
do
	po/pl_create_placeholder $i >> placeholder.h.$$
done

echo "};" >> placeholder.h.$$

# diff returns true if files are equal
if ! diff placeholder.h.$$ placeholder.h > /dev/null 2> /dev/null
then
	cat placeholder.h.$$ > placeholder.h
fi
rm -f placeholder.h.$$