#!/bin/bash BASEPATH=$(readlink -f "$(dirname $0)/") if test ! -d $BASEPATH/www ; then echo "wrong base path: $BASEPATH" 1>&2 exit 1 fi find $BASEPATH/site/languages -type f -name "*.po" -print0 | while read -d '' -r file; do po="$file"; mo="${file%.[^.]*}.mo" msgfmt "$po" -o "$mo" done