commit:     96f7e63620ae1c821f48759e3c6b253f01d9170f
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Wed Mar  2 01:40:00 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sat Mar 12 17:00:29 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96f7e636

kde5.eclass: Don't delete po/*.po files, only when not in LINGUAS

 eclass/kde5.eclass | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index fd83a71..9356f39 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -387,13 +387,13 @@ kde5_src_prepare() {
                if [[ -d po ]] ; then
                        pushd po > /dev/null || die
                        for lang in *; do
-                               if ! has ${lang} ${LINGUAS} ; then
-                                       if [[ ${lang} != CMakeLists.txt ]] ; 
then
-                                               rm -rf ${lang}
-                                       fi
+                               if [[ -d ${lang} ]] && ! has ${lang} ${LINGUAS} 
; then
+                                       rm -r ${lang} || die
                                        if [[ -e CMakeLists.txt ]] ; then
                                                cmake_comment_add_subdirectory 
${lang}
                                        fi
+                               elif ! has ${lang/.po/} ${LINGUAS} ; then
+                                       rm ${lang} || die
                                fi
                        done
                        popd > /dev/null || die

Reply via email to