add8412224ac01ffeee79e93ca6d9228cb45d438
[packages/dokuwiki-plugin-pagelist.git] / dokuwiki-find-lang.sh
1 #!/bin/sh
2 dir=$RPM_BUILD_ROOT/usr/share/dokuwiki
3 langfile=$1
4
5 > $langfile
6 find $dir -type d -name lang | while read dir; do
7         echo "%dir ${dir#$RPM_BUILD_ROOT}" >> $langfile
8         for dir in $dir/*; do
9                 lang=${dir##*/}
10                 dir=${dir#$RPM_BUILD_ROOT}
11                 case "$lang" in
12                 zh-tw)
13                         lang=zh_TW
14                 ;;
15                 pt-br)
16                         lang=pt_BR
17                 ;;
18                 sl-si)
19                         lang=sl
20                 ;;
21                 id-ni)
22                         lang=id_NI
23                 ;;
24                 *-*)
25                         echo >&2 "Need mapping for $lang!"
26                         exit 1
27                 ;;
28                 esac
29                 echo "%lang($lang) ${dir#$RPM_BUILD_ROOT}" >> $langfile
30         done
31 done
This page took 0.025613 seconds and 2 git commands to generate.