SOURCES: rpm-find-lang - added support for OMF files
megabajt
megabajt at pld-linux.org
Mon Sep 24 18:24:56 CEST 2007
Author: megabajt Date: Mon Sep 24 16:24:56 2007 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- added support for OMF files
---- Files affected:
SOURCES:
rpm-find-lang (1.21 -> 1.22)
---- Diffs:
================================================================
Index: SOURCES/rpm-find-lang
diff -u SOURCES/rpm-find-lang:1.21 SOURCES/rpm-find-lang:1.22
--- SOURCES/rpm-find-lang:1.21 Thu May 24 09:16:32 2007
+++ SOURCES/rpm-find-lang Mon Sep 24 18:24:50 2007
@@ -49,6 +49,7 @@
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 @@
GNOME='#'
KDE='#'
+OMF='#'
MO=''
MO_NAME=$NAME.lang
ALL_NAME='#'
@@ -93,6 +95,11 @@
KDE=''
shift
;;
+ --with-omf)
+ echo "$PROG: Enabling with OMF"
+ OMF=''
+ shift
+ ;;
--without-mo)
echo "$PROG: Disabling .mo files"
MO='#'
@@ -122,6 +129,15 @@
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:%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
@@ -169,6 +198,18 @@
'"$NO_ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3:
'"$ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\)::
'"$ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3:
+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
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm-find-lang?r1=1.21&r2=1.22&f=u
More information about the pld-cvs-commit
mailing list