blob: f65dae6a9d2d4315afc0a72fde271fb042bafd93 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/bash
# syntax:
# merge-po.sh extracted.pot destination-dir/
function usage() {
echo "syntax:"
echo "merge-po.sh extracted.pot destination-dir/"
exit 1
}
tempfoo=`basename $0`
TMPFILE=`mktemp /tmp/${tempfoo}.XXXXXX` || exit 1
# check if file and dir are there
if [[ ($# -ne 2) || (! -f "$1") || (! -d "$2") ]]; then usage; fi
for lang in `find $2 -type f -name "*.po"`; do
msgmerge --no-fuzzy-matching $lang $1 > $TMPFILE
cp "$TMPFILE" "$lang"
done
rm "$TMPFILE"
|