#!/bin/bash # # build mo files # targetDir="../anki-qt/aqt_data/locale" mkdir -p $targetDir echo "Compiling *.po..." for file in translations/anki.pot/* do outdir=$(echo $file | \ perl -pe "s%translations/anki.pot/(.*)%$targetDir/\1/LC_MESSAGES%") outfile="$outdir/anki.mo" mkdir -p $outdir msgfmt $file --output-file=$outfile done