#!/bin/sh
# vim: expandtab sw=4 ts=4 sts=4:

set -e

LOCS=`ls locale/*/gammu.po | sed 's@.*/\(.*\)/[^/]*@\1@'`
ver=`sed -n 's/set (GAMMU_VERSION "\([^"]*\)".*)/\1/p' CMakeLists.txt`

po4a \
    --msgid-bugs-address michal@cihar.com \
    --copyright-holder "Michal Čihař <michal@cihar.com>" \
    --package-name Gammu-docs \
    --package-version $ver \
    admin/po4a-docs.config
sed -i '
    s/SOME DESCRIPTIVE TITLE/Gammu documentation translation/;
    s/PACKAGE/Gammu-docs/;
    s/(C) YEAR/(C) 2003 - '`date +%Y`'/;
    s/VERSION/'$ver'/;
    ' locale/docs.pot
    
