diff --git a/build/workspaces/build-osx-bundle.sh b/build/workspaces/build-osx-bundle.sh index bf5ae0cafa..00fd03119c 100755 --- a/build/workspaces/build-osx-bundle.sh +++ b/build/workspaces/build-osx-bundle.sh @@ -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 diff --git a/source/tools/dist/build.sh b/source/tools/dist/build.sh index 6dd3e443a1..aa2d2dcd12 100755 --- a/source/tools/dist/build.sh +++ b/source/tools/dist/build.sh @@ -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 diff --git a/source/tools/dist/remove-incomplete-translations.sh b/source/tools/dist/remove-incomplete-translations.sh new file mode 100644 index 0000000000..373b1a4234 --- /dev/null +++ b/source/tools/dist/remove-incomplete-translations.sh @@ -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