From: arekm Date: Sun, 20 Jun 2004 18:55:19 +0000 (+0000) Subject: - find-lang.sh: implemented --with-kde (finds KDE help files); X-Git-Tag: tznext/4.11.0.1.tizen20130304~6422 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8fa4686e09a678ec75c8f1db38fef3592b31689d;p=tools%2Flibrpm-tizen.git - find-lang.sh: implemented --with-kde (finds KDE help files); add --all-name option (finds every lang file); drop defattr() from *.lang files (arekm,mkochano,pascalek,wiget@PLD). CVS patchset: 7348 CVS date: 2004/06/20 18:55:19 --- diff --git a/CHANGES b/CHANGES index a6eb124..1e7df4a 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,9 @@ - rpmGlob() is now locale independent (wiget@PLD). - conditional build support/unification (jajcus,malekith,qboosh,wiget@PLD). - fix: readelf.c breakage on some non x86 arches (qboosh@PLD). + - find-lang.sh: implemented --with-kde (finds KDE help files); + add --all-name option (finds every lang file); drop defattr() + from *.lang files (arekm,mkochano,pascalek,wiget@PLD). = add type to tag array. 4.3.1 -> 4.3.2: diff --git a/scripts/find-lang.sh b/scripts/find-lang.sh index ff07589..d5e55b5 100755 --- a/scripts/find-lang.sh +++ b/scripts/find-lang.sh @@ -11,8 +11,9 @@ #in tact and are included with any redistribution of this file or any #work based on this file. -#changes: -# 1999-10-19 Artur Frysiak +# 2004-06-20 Arkadiusz Mi¶kiewicz +# * merge PLD changes, kde, all-name (mkochano,pascalek@PLD) +# 1999-10-19 Artur Frysiak # * added support for GNOME help files # * start support for KDE help files @@ -30,7 +31,8 @@ PACKAGE_NAME.lang unless \$3 is given in which case output is written to \$3. Additional options: --with-gnome find GNOME help files - --with-kde find KDE help files (not implemented yet) + --with-kde find KDE help files + --all-name match all package/domain names --without-mo not find locales files EOF exit 1 @@ -54,6 +56,8 @@ GNOME=# KDE=# MO= MO_NAME=$NAME.lang +ALL_NAME=# +NO_ALL_NAME= while test $# -gt 0 ; do case "${1}" in @@ -62,13 +66,18 @@ while test $# -gt 0 ; do shift ;; --with-kde ) - KDE_HELP= + KDE= shift ;; --without-mo ) MO=# shift ;; + --all-name ) + ALL_NAME= + NO_ALL_NAME=# + shift + ;; * ) MO_NAME=${1} shift @@ -77,22 +86,35 @@ while test $# -gt 0 ; do done find $TOP_DIR -type f|sed ' -1i\ -%defattr (644, root, root, 755) s:'"$TOP_DIR"':: -'"$MO"'s:\(.*/share/locale/\)\([^/_]\+\)\(.*/'"$NAME"'\.mo$\):%lang(\2) \1\2\3: -'"$GNOME"'s:\(.*/gnome/help/'"$NAME"'/\)\([^/_]\+\):%lang(\2) \1\2: +'"$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) :: +/^$/d' > $MO_NAME + +find $TOP_DIR -type d|sed ' +s:'"$TOP_DIR"':: +'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir \1: +'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\):: +'"$NO_ALL_NAME$GNOME"'s:\(.*/gnome/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) \1\2: +'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+$\):%dir \1: +'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]/.\+\):: +'"$ALL_NAME$GNOME"'s:\(.*/gnome/help/[a-zA-Z0-9.\_\-]\+\/\)\([^/_]\+\):%lang(\2) \1\2: +s:%lang(.*) .*/gnome/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+/.*:: s:^\([^%].*\):: s:%lang(C) :: -' > $MO_NAME +/^$/d' >> $MO_NAME find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"':: -'"$GNOME"'s:\(.*/gnome/help/'"$NAME"'$\):%dir \1: -'"$GNOME"'s:\(.*/gnome/help/'"$NAME"'/\)\([^/_]\+\):%dir %lang(\2) \1\2: +'"$NO_ALL_NAME$KDE"'s:\(.*/doc/kde/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\):: +'"$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) :: -' >> $MO_NAME +/^$/d' >> $MO_NAME if ! grep -q / $MO_NAME; then echo "No translations found for ${NAME} in ${TOP_DIR}"