--- find-lang 2003-11-26 21:25:38 +0300 +++ find-lang.with_kde 2004-01-04 04:44:41 +0300 @@ -40,6 +40,7 @@ --without-mo do not look for locales files; --with-man look for man pages; --with-gnome look for GNOME help and omf files; +--with-kde look for KDE help files; --append do not truncate output file before writing; --output=FILENAME filename where to write output, by default PACKAGE_NAME.lang; --topdir=TOPDIR the top of the tree containing the files to be processed, @@ -52,7 +53,7 @@ [ -n "$1" ] && exit "$1" || exit } -TEMP=`getopt -n "$PROG" -o h -l without-mo,with-man,with-gnome,append,output:,topdir:,help -- "$@"` || Usage +TEMP=`getopt -n "$PROG" -o h -l without-mo,with-man,with-gnome,with-kde,append,output:,topdir:,help -- "$@"` || Usage eval set -- "$TEMP" : ${TOPDIR:=$RPM_BUILD_ROOT} @@ -76,6 +77,10 @@ FIND_GNOME=1 shift ;; + --with-kde) + FIND_KDE=1 + shift + ;; --append) APPEND=1 shift @@ -168,6 +173,22 @@ ' |grep -v '^$' >> "$OUTFILE" ||: fi + if [ -n "$FIND_KDE" ]; then + find $TOPDIR -type d |sed ' +s:'"$TOPDIR"':: +s:\(.*/share/doc/HTML/[^/_]\+'"$NAME"'\)$:%dir \1: +s:\(.*/share/doc/HTML/\)\([^/_]\+\)\(/'"$NAME"'\):%lang(\2) %dir \1\2\3: +s:^\([^%].*\):: +s:%lang(en) :: + ' |grep -v '^$' >> "$OUTFILE" ||: + + find "$TOPDIR" -type f -o -type l|sed ' +s:'"$TOPDIR"':: +s:\(.*/share/doc/HTML/\)\([^/_]\+\)\(/'"$NAME"'/.*\):%lang(\2) \1\2\3: +s:^\([^%].*\):: +s:%lang(en) :: + ' |grep -v '^$' >> "$OUTFILE" ||: + fi } for NAME in "$@"; do