package-translations/PREPARE_PACKAGE
OBS User autobuild c336710254 Accepting request 40840 from system:install:head
Copy from system:install:head/package-translations based on submit request 40840 from user coolo

OBS-URL: https://build.opensuse.org/request/show/40840
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/package-translations?expand=0&rev=5
2010-05-30 22:59:49 +00:00

26 lines
716 B
Bash

#!/bin/bash
test -f package-translations.spec || { "cwd must contain package-translations.spec"; exit 1; }
if test -d "$MY_LCN_PACK_CHECKOUT"; then
echo "Updating $MY_LCN_PACK_CHECKOUT"
svn up $MY_LCN_PACK_CHECKOUT
else
echo "No \$MY_LCN_PACK_CHECKOUT set, will checkout temporarly"
svn export https://forgesvn1.novell.com/svn/suse-i18n/trunk/packages
export MY_LCN_PACK_CHECKOUT=$PWD/packages
fi
rm -rf mo
mkdir mo
for file in $MY_LCN_PACK_CHECKOUT/*/po; do
lang=`echo $file | sed -e "s,/po,,; s,.*/,,"`
echo $file $lang
msgcat --use-first $file/*.po | msgfmt -o mo/package-translations-$lang.mo -
done
rm -f package-translations.tar.bz2
tar cfj package-translations.tar.bz2 mo
rm -rf mo
exit 0