]> git.pld-linux.org Git - packages/dokuwiki-plugin-cacherevisionseraser.git/blobdiff - dokuwiki-find-lang.sh
- refresh dw cache on install
[packages/dokuwiki-plugin-cacherevisionseraser.git] / dokuwiki-find-lang.sh
index 517125a6c1fb9c6b581635cbb7ebfeca5fd9b878..86f46faf6b4f08cf697d4570f632322a9c0411bb 100644 (file)
@@ -1,8 +1,9 @@
 #!/bin/sh
+PROG=${0##*/}
 dir=$RPM_BUILD_ROOT/usr/share/dokuwiki
 langfile=$1
 
-> $langfile
+echo '%defattr(644,root,root,755)' > $langfile
 find $dir -type d -name lang | while read dir; do
        echo "%dir ${dir#$RPM_BUILD_ROOT}" >> $langfile
        for dir in $dir/*; do
@@ -15,11 +16,22 @@ find $dir -type d -name lang | while read dir; do
                pt-br)
                        lang=pt_BR
                ;;
+               sl-si)
+                       lang=sl
+               ;;
+               id-ni)
+                       lang=id_NI
+               ;;
                *-*)
-                       : Need mapping for $lang!
+                       echo >&2 "Need mapping for $lang!"
                        exit 1
                ;;
                esac
                echo "%lang($lang) ${dir#$RPM_BUILD_ROOT}" >> $langfile
        done
 done
+
+if [ "$(egrep -v '(^%defattr|^$)' $langfile | wc -l)" -le 0 ]; then
+       echo >&2 "$PROG: Error: international files not found!"
+       exit 1
+fi
This page took 0.04876 seconds and 4 git commands to generate.