Unify removal of incomplete translations in packaging scripts. Fixes #2825.

This was SVN commit r15826.
This commit is contained in:
leper 2014-09-28 21:51:48 +00:00
parent 436eb18397
commit 2afeec0c01
3 changed files with 11 additions and 2 deletions

View File

@ -84,7 +84,7 @@ if [ "$build_release" = "true" ]; then
cd $build_path
rm binaries/data/config/dev.cfg
# Only include translations for a subset of languages
find binaries/data -name "*.po" | grep -v '.*/\(ca\|cs\|de\|en_GB\|es\|fr\|gd\|gl\|it\|nl\|pt_PT\|pt_BR\)\.[-A-Za-z0-9_.]\+\.po' | xargs rm
. source/tools/dist/remove-incomplete-translations.sh $build_path/binaries/data
echo L\"${SVNREV}-release\" > build/svn_revision/svn_revision.txt
cd build/workspaces
fi

View File

@ -23,7 +23,7 @@ svn export ${SVNWC} export-unix
svn export --native-eol CRLF ${SVNWC} export-win32
# Only include translations for a subset of languages
find export-{unix,win32}/binaries/data/ -name "*.po" | grep -v '.*/\(ca\|cs\|de\|en_GB\|es\|fr\|gd\|gl\|it\|nl\|pt_PT\|pt_BR\)\.[-A-Za-z0-9_.]\+\.po' | xargs rm
. remove-incomplete-translations.sh export-{unix,win32}/binaries/data/
# Update the svn_revision, so these builds can be identified
echo L\"${SVNREV}-release\" > export-unix/build/svn_revision/svn_revision.txt

View File

@ -0,0 +1,9 @@
#!/bin/bash
# Included languages
LANGS=("ca" "cs" "de" "en_GB" "es" "fr" "gd" "gl" "it" "nl" "pt_PT" "pt_BR")
REGEX=$(printf "\|%s" "${LANGS[@]}")
REGEX=".*/\("${REGEX:2}"\).[-A-Za-z0-9_.]\+\.po"
find "$@" -name "*.po" | grep -v "$REGEX" | xargs rm