diff options
author | arekm <devnull@localhost> | 2004-06-20 18:55:19 +0000 |
---|---|---|
committer | arekm <devnull@localhost> | 2004-06-20 18:55:19 +0000 |
commit | 8fa4686e09a678ec75c8f1db38fef3592b31689d (patch) | |
tree | 422ab29164149b5748deb73519cd214470a7c316 /scripts | |
parent | 5f27320366fc8963c8bd5568140039badda10b34 (diff) | |
download | rpm-8fa4686e09a678ec75c8f1db38fef3592b31689d.tar.gz |
- 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
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/find-lang.sh | 46 |
1 files changed, 34 insertions, 12 deletions
diff --git a/scripts/find-lang.sh b/scripts/find-lang.sh index ff075897d..d5e55b5e5 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 <wiget@pld.org.pl> +# 2004-06-20 Arkadiusz Mi¶kiewicz <arekm@pld-linux.org> +# * merge PLD changes, kde, all-name (mkochano,pascalek@PLD) +# 1999-10-19 Artur Frysiak <wiget@pld-linux.org> # * 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}" |