~dcplusplus-team/dcplusplus/trunk

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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash

SOURCE=$1
if [[ ! -d $SOURCE ]] ; then
	echo $SOURCE is not a directory && exit 1
fi

shopt -s nullglob

process() {

PREFIX=$1
DIR=$2

echo Processing $PREFIX...

# move all files to the root dir
find $SOURCE -type f -exec mv '{}' $SOURCE \;

cd $DIR/po

for a in $SOURCE/${PREFIX}-*.po ; do
	FILE=${a#$SOURCE/${PREFIX}-}
	echo $FILE

	if [ -f $FILE ] ; then
		msgmerge -U -C $FILE $a $PREFIX.pot
	else
		msgmerge -U $a $PREFIX.pot
	fi && mv $a $FILE
done

cd ../..

}

scons i18n=1 dcpp/po win32/po help/po

process libdcpp dcpp
process dcpp-win32 win32
process dcpp-help help