SOURCES: dokuwiki-find-lang.sh - barf if lang files not found
glen
glen at pld-linux.org
Wed Jan 28 14:48:04 CET 2009
Author: glen Date: Wed Jan 28 13:48:04 2009 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- barf if lang files not found
---- Files affected:
SOURCES:
dokuwiki-find-lang.sh (1.3 -> 1.4)
---- Diffs:
================================================================
Index: SOURCES/dokuwiki-find-lang.sh
diff -u SOURCES/dokuwiki-find-lang.sh:1.3 SOURCES/dokuwiki-find-lang.sh:1.4
--- SOURCES/dokuwiki-find-lang.sh:1.3 Tue Jan 27 15:33:49 2009
+++ SOURCES/dokuwiki-find-lang.sh Wed Jan 28 14:47:59 2009
@@ -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 @@
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
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/dokuwiki-find-lang.sh?r1=1.3&r2=1.4&f=u
More information about the pld-cvs-commit
mailing list