livecd-rootfs/checkout-translations-branch
Michael Hudson-Doyle 10288220fc add a script to checkout a translations branch
and compile the po files into mo files
2021-08-17 16:05:41 +12:00

23 lines
299 B
Bash
Executable File

#!/bin/sh
set -eux
branch=$1
target="$(readlink -f "${2}")"
tmpdir="$(mktemp -d)"
cd "${tmpdir}"
cleanup () {
rm -rf "${tmpdir}"
}
trap cleanup EXIT
mkdir -p $target
bzr branch $branch checkout
for po in checkout/*.po; do
msgfmt "${po}" -o "${target}/$(basename "${po}" .po).mo"
done