You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
livecd-rootfs/checkout-translations-branch

24 lines
310 B

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