File indexing completed on 2024-05-12 05:17:33

0001 #!/bin/bash
0002 # SPDX-FileCopyrightText: 2019-2022 Volker Krause <vkrause@kde.org>
0003 # SPDX-License-Identifier: BSD-2-Clause
0004 set -e
0005 set -x
0006 
0007 DEPLOY_ROOT=$BUILD_ROOT/$CI_PROJECT_PATH/build/
0008 
0009 mkdir -p $DEPLOY_ROOT/share/
0010 cp -rv $STAGING_ROOT/share/locale $DEPLOY_ROOT/share/
0011 
0012 # remove catalogs we don't use
0013 for i in iso_15924.mo iso_3166.mo iso_3166_2.mo iso_3166-3.mo iso_4217.mo 'iso_639*.mo' karchive5_qt.qm kcodecs5_qt.qm kconfig5_qt.qm kcoreaddons5_qt.qm libkmime5.mo kcontacts5.mo ki18n5.mo LC_SCRIPTS; do
0014     find $DEPLOY_ROOT -name $i | xargs rm -rf
0015 done
0016 
0017 # remove languages we have no own translation for
0018 for i in `ls $DEPLOY_ROOT/share/locale`; do
0019     if ! [ -f $DEPLOY_ROOT/share/locale/$i/LC_MESSAGES/kitinerary.mo ]; then
0020         echo "Dropping language $i"
0021         rm -rf $DEPLOY_ROOT/share/locale/$i
0022     fi
0023 done