- helper to find lang files
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 21 Aug 2008 15:07:33 +0000 (15:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    fckeditor-find-lang.sh -> 1.1

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

diff --git a/fckeditor-find-lang.sh b/fckeditor-find-lang.sh
new file mode 100644 (file)
index 0000000..c1f1234
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+dir=$RPM_BUILD_ROOT/usr/share/fckeditor
+langfile=$1
+
+> $langfile
+find $dir -type d -name lang | while read dir; do
+       echo "%dir ${dir#$RPM_BUILD_ROOT}" >> $langfile
+
+       for f in $dir/??*.js; do
+               lang=${f##*/}
+               lang=${lang%.*}
+               dir=${f#$RPM_BUILD_ROOT}
+               case "$lang" in
+               en-au)
+                       lang=en_AU
+               ;;
+               en-ca)
+                       lang=en_CA
+               ;;
+               en-uk)
+                       lang=en_UK
+               ;;
+               fr-ca)
+                       lang=fr_CA
+               ;;
+               pt-br)
+                       lang=pt_BR
+               ;;
+               sr-latn)
+                       lang=sr@Latin
+               ;;
+               zh-cn)
+                       lang=zh_CN
+               ;;
+               *-*)
+                       echo >&2 "Need mapping for $lang!"
+                       exit 1
+               ;;
+               esac
+               echo "%lang($lang) ${dir#$RPM_BUILD_ROOT}" >> $langfile
+       done
+done
This page took 0.036758 seconds and 4 git commands to generate.