X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=rpm-find-lang;h=e1293fbadd5194796794c9003a1c83f27b76d9ad;hb=c1caefa55b37605474a82e264ac54aa134c5a734;hp=fc18350d2d7492d98ab960f95142a06ce1c53696;hpb=e2a1c5bc691450375d6f6cf465c356478f7b3219;p=packages%2Frpm-build-macros.git diff --git a/rpm-find-lang b/rpm-find-lang index fc18350..e1293fb 100644 --- a/rpm-find-lang +++ b/rpm-find-lang @@ -95,17 +95,17 @@ while test $# -gt 0 ; do esac done -find $TOP_DIR -type f -name \*.mo | xargs file | egrep -v ', 1 messages$' |\ +echo '%defattr(644,root,root,755)' > $MO_NAME + +find $TOP_DIR -type f -name \*.mo | xargs -r file | egrep -v ', 1 messages$' |\ sed ' s/:.*// -1i\ -%defattr (644, root, root, 755) s:'"$TOP_DIR"':: '"$ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: '"$NO_ALL_NAME$MO"'s:\(.*/share/locale/\)\([^/]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: -s:^\$::' | egrep -v '^$' > $MO_NAME +s:^\$::' | egrep -v '^$' >> $MO_NAME find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"'::