translation-update-upstream/create-tlst-step1-list-all-po-projects.sh

37 lines
864 B
Bash

#!/bin/bash
# This program searches for all active translations in the distro and
# does dumb guesses of project - domain relations.
#
# It needs access to distro RPMs.
#
set -o errexit
source ${0%create-tlst-step1-list-all-po-projects.sh}create-tlst.conf
cd $BINARY_REPO/suse/$BINARY_ARCH
for i in *.rpm ; do echo $i: ; rpm -qlp $i | grep LC_MESSAGES || : ; done >$OLDPWD/create-tlst-temp-all-po-files.lst
cd $OLDPWD
cd $BINARY_REPO/suse/noarch
for i in *.rpm ; do echo $i: ; rpm -qlp $i | grep LC_MESSAGES || : ; done >>$OLDPWD/create-tlst-temp-all-po-files.lst
cd $OLDPWD
cat create-tlst-temp-all-po-files.lst |
sed '
/:$/ {
h
d
}
/LC_MESSAGES$/d
s:.*/LC_MESSAGES/::
/.*/ {
G
s/\(.*\)\.mo\n\(.*\)\.rpm:/\2 \1/
}
/kde3-i18n/d
' |
uniq |
LC_COLLATE=C LC_ALL= sort -u >create-tlst-temp-all-po-projects.lst
rm create-tlst-temp-all-po-files.lst