]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-find-lang
- behave like on x86
[packages/rpm.git] / rpm-find-lang
index d08a0e63f5f7bcef02b783d705f71eb619a36fb8..9780aa49cc01079c3ad678d793e4d192a208be65 100644 (file)
@@ -113,7 +113,7 @@ done
 
 echo '%defattr(644,root,root,755)' > $MO_NAME
 
-if [ ! -f __find.files ]; then
+if [ ! -f __find.files ] || [ "$TOP_DIR" -nt __find.files ]; then
        find $TOP_DIR -type f -name '*.mo' | xargs -r file | egrep -v ', 1 messages$' | \
        sed -e '
                s/:.*//
@@ -135,7 +135,7 @@ s:^\([^%].*\)::
 s:%lang(C) ::
 s:^\$::' | egrep -v '^$' >> $MO_NAME
 
-if [ ! -f __find.dirs ]; then
+if [ ! -f __find.dirs ] || [ "$TOP_DIR" -nt __find.dirs ]; then
        find $TOP_DIR -type d | sed 's:'"$TOP_DIR"'::' > __find.dirs
 else
        echo "$PROG: Using cached __find.dirs"
@@ -173,6 +173,6 @@ s:^\([^%].*\)::
 s:%lang(C) ::' | egrep -v '^$' >> $MO_NAME
 
 if [ "$(egrep -v '(^%defattr|^$)' $MO_NAME | wc -l)" -le 0 ]; then
-       echo 'Error: international files not found !'
+       echo >&2 "Error: international files not found for $NAME!"
        exit 1
 fi
This page took 0.03731 seconds and 4 git commands to generate.