]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
- added support for OMF files
authorMarcin Banasiak <marcin.banasiak@gmail.com>
Mon, 24 Sep 2007 16:24:50 +0000 (16:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-find-lang -> 1.22

rpm-find-lang

index 9780aa49cc01079c3ad678d793e4d192a208be65..fbbafbbbaf7b5dc5f78180f7a4978ae02fdcbc88 100644 (file)
@@ -49,6 +49,7 @@ to \$3.
 Additional options:
   --with-gnome         find GNOME help files
   --with-kde           find KDE help files
+  --with-omf           find OMF files
   --all-name           match all package/domain names
   --without-mo         skip *.mo locale files
 EOF
@@ -77,6 +78,7 @@ shift
 
 GNOME='#'
 KDE='#'
+OMF='#'
 MO=''
 MO_NAME=$NAME.lang
 ALL_NAME='#'
@@ -93,6 +95,11 @@ while test $# -gt 0 ; do
                KDE=''
                shift
                ;;
+       --with-omf)
+               echo "$PROG: Enabling with OMF"
+               OMF=''
+               shift
+               ;;
        --without-mo)
                echo "$PROG: Disabling .mo files"
                MO='#'
@@ -122,6 +129,15 @@ else
        echo "$PROG: Using cached __find.files"
 fi
 
+if [ ! -f __omf.files ] || [ "$TOP_DIR" -nt __omf.files ]; then
+       find $TOP_DIR -type f -name '*.omf' | \
+       sed -e '
+               s/:.*//
+               s:'"$TOP_DIR"'::' > __omf.files
+else
+       echo "$PROG: Using cached __omf.files"
+fi
+
 (
        if [ "$ALL_NAME" ]; then
                fgrep $NAME __find.files
@@ -135,6 +151,19 @@ s:^\([^%].*\)::
 s:%lang(C) ::
 s:^\$::' | egrep -v '^$' >> $MO_NAME
 
+(
+       if [ "$ALL_NAME" ]; then
+               fgrep $NAME __omf.files
+       else
+               cat __omf.files
+       fi
+) | sed '
+'"$ALL_NAME$OMF"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+\)\(.*\-\)\(.*\)\(.*\.omf\):%lang(\3) \1\2\3\4:
+'"$NO_ALL_NAME$OMF"'s:\(.*/omf/'"$NAME"'\)\(.*\-\)\(.*\)\(.*\.omf\):%lang(\3) \1\2\3\4:
+s:^\([^%].*\)::
+s:%lang(C) ::
+s:^\$::' | egrep -v '^$' >> $MO_NAME
+
 if [ ! -f __find.dirs ] || [ "$TOP_DIR" -nt __find.dirs ]; then
        find $TOP_DIR -type d | sed 's:'"$TOP_DIR"'::' > __find.dirs
 else
@@ -172,6 +201,18 @@ s:%lang(C) ::' | egrep -v '^$' >> $MO_NAME
 s:^\([^%].*\)::
 s:%lang(C) ::' | egrep -v '^$' >> $MO_NAME
 
+(
+       if [ "$ALL_NAME" ]; then
+               fgrep $NAME __find.dirs
+       else
+               cat __find.dirs
+       fi
+) | sed '
+'"$NO_ALL_NAME$OMF"'s:\(.*/omf/'"$NAME"'$\):%dir \1:
+'"$ALL_NAME$OMF"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%dir \1:
+s:^\([^%].*\)::
+s:%lang(C) ::' | egrep -v '^$' >> $MO_NAME
+
 if [ "$(egrep -v '(^%defattr|^$)' $MO_NAME | wc -l)" -le 0 ]; then
        echo >&2 "Error: international files not found for $NAME!"
        exit 1
This page took 0.054358 seconds and 4 git commands to generate.