Fixed msgmerge not stopping the shell on error

This commit is contained in:
evandrocoan 2020-02-24 17:53:26 -03:00
parent 87c5316123
commit c171104a81

View file

@ -2,7 +2,7 @@
#
# build mo files
#
set -e
set -eo pipefail
targetDir="../aqt_data/locale/gettext"
mkdir -p $targetDir
@ -10,9 +10,9 @@ mkdir -p $targetDir
echo "Compiling *.po..."
for file in po/desktop/*/anki.po
do
outdir=$(echo $file | \
outdir=$(echo "$file" | \
perl -pe "s%po/desktop/(.*)/anki.po%$targetDir/\1/LC_MESSAGES%")
outfile="$outdir/anki.mo"
mkdir -p $outdir
msgmerge --for-msgfmt $file po/desktop/anki.pot | msgfmt - --output-file=$outfile
msgmerge --for-msgfmt "$file" po/desktop/anki.pot | msgfmt - --output-file=$outfile
done