summaryrefslogtreecommitdiffstats
path: root/cygwin-find-lang.sh
blob: 1ac23c8a3050b867639c36d3ab0ec1097dc17063 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

# Wrapper for the %find_lang macro which splits out the various translations in per-target lists

/usr/lib/rpm/find-lang.sh $*
if test $? != 0 ; then
    exit 1
fi

PACKAGE_NAME=$2
targets=`rpm --eval '%{cygwin_build_targets}'`
for target in $targets; do
	prefix=`rpm --eval "%{${target}_prefix}"`
	cat $2.lang | grep "$prefix" > ${target}-$PACKAGE_NAME.lang
done

exit 0