- barf if lang files not found
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 28 Jan 2009 13:47:59 +0000 (13:47 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    dokuwiki-find-lang.sh -> 1.4

dokuwiki-find-lang.sh

index add8412..86f46fa 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
@@ -29,3 +30,8 @@ find $dir -type d -name lang | while read dir; do
                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.047702 seconds and 4 git commands to generate.