- find dokuwiki languages
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 8 Jan 2008 14:00:30 +0000 (14:00 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dokuwiki-find-lang.sh -> 1.1

dokuwiki-find-lang.sh [new file with mode: 0644]

diff --git a/dokuwiki-find-lang.sh b/dokuwiki-find-lang.sh
new file mode 100644 (file)
index 0000000..517125a
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh
+dir=$RPM_BUILD_ROOT/usr/share/dokuwiki
+langfile=$1
+
+> $langfile
+find $dir -type d -name lang | while read dir; do
+       echo "%dir ${dir#$RPM_BUILD_ROOT}" >> $langfile
+       for dir in $dir/*; do
+               lang=${dir##*/}
+               dir=${dir#$RPM_BUILD_ROOT}
+               case "$lang" in
+               zh-tw)
+                       lang=zh_TW
+               ;;
+               pt-br)
+                       lang=pt_BR
+               ;;
+               *-*)
+                       : Need mapping for $lang!
+                       exit 1
+               ;;
+               esac
+               echo "%lang($lang) ${dir#$RPM_BUILD_ROOT}" >> $langfile
+       done
+done
This page took 0.03999 seconds and 4 git commands to generate.