#!/bin/sh

if ! which msgfmt > /dev/null 2>&1 ; then
    exit 1
fi

DOMAIN=imip-agent

for FILENAME in messages/*.po ; do
    LOCALE_ID=`basename "$FILENAME" ".$DOMAIN.po"`
    mkdir -p "locale/$LOCALE_ID/LC_MESSAGES"
    msgfmt -o "locale/$LOCALE_ID/LC_MESSAGES/$DOMAIN.mo" "$FILENAME"
done
