]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - find-lang.sh
document _noautoreq_pyegg, _noautoreq_py3egg
[packages/rpm-build-macros.git] / find-lang.sh
index f924e92ecf2e4a049b79be3b878733ba19da1a0f..189cb62008add856e1be1807f08de47e439212de 100755 (executable)
@@ -36,7 +36,7 @@
 #   * start support for KDE help files
 
 PROG=${0##*/}
-VERSION=1.36
+VERSION=1.38
 
 usage () {
 cat <<EOF
@@ -97,36 +97,36 @@ while test $# -gt 0; do
     case "$1" in
        --with-gnome)
                GNOME=''
-               echo "$PROG: Enabling with GNOME"
+               echo >&2 "$PROG: Enabling with GNOME"
                shift
                ;;
        --with-mate)
                MATE=''
-               echo "$PROG: Enabling with MATE"
+               echo >&2 "$PROG: Enabling with MATE"
                shift
                ;;
        --with-kde)
-               echo "$PROG: Enabling with KDE"
+               echo >&2 "$PROG: Enabling with KDE"
                KDE=''
                shift
                ;;
        --with-omf)
-               echo "$PROG: Enabling with OMF"
+               echo >&2 "$PROG: Enabling with OMF"
                OMF=''
                shift
                ;;
        --with-qm)
-               echo "$PROG: Enabling with Qt QM"
+               echo >&2 "$PROG: Enabling with Qt QM"
                QM=''
                shift
                ;;
        --without-mo)
-               echo "$PROG: Disabling .mo files"
+               echo >&2 "$PROG: Disabling .mo files"
                MO='#'
                shift
                ;;
        --all-name)
-               echo "$PROG: Enabling with all names"
+               echo >&2 "$PROG: Enabling with all names"
                ALL_NAME=''
                NO_ALL_NAME='#'
                shift
@@ -149,7 +149,7 @@ while test $# -gt 0; do
     esac
 done
 
-echo "$PROG/$VERSION: find-lang '$NAME' $APPEND> $OUTPUT"
+echo >&2 "$PROG/$VERSION: find-lang '$NAME' $APPEND> $OUTPUT"
 
 MO_NAME=.$OUTPUT.tmp~
 echo '%defattr(644,root,root,755)' > $MO_NAME
@@ -162,7 +162,7 @@ if [ ! -f __find.files ] || [ "$TOP_DIR" -nt __find.files ]; then
                s/:.*//
                s:'"$TOP_DIR"'::' > __find.files
 else
-       echo "$PROG: Using cached __find.files"
+       echo >&2 "$PROG: Using cached __find.files"
 fi
 
 # .omf
@@ -171,7 +171,7 @@ if [ ! -f __omf.files ] || [ "$TOP_DIR" -nt __omf.files ]; then
        sed -e '
                s:'"$TOP_DIR"'::' > __omf.files
 else
-       echo "$PROG: Using cached __omf.files"
+       echo >&2 "$PROG: Using cached __omf.files"
 fi
 
 # .qm
@@ -180,7 +180,7 @@ if [ ! -f __qm.files ] || [ "$TOP_DIR" -nt __qm.files ]; then
        sed -e '
                s:'"$TOP_DIR"'::' > __qm.files
 else
-       echo "$PROG: Using cached __qm.files"
+       echo >&2 "$PROG: Using cached __qm.files"
 fi
 
 # .mo
@@ -217,15 +217,20 @@ s:%lang(C) ::' >> $MO_NAME
                cat __qm.files
        fi
 ) | sed '
-'"$ALL_NAME$QM"'s:\(.*/share/locale/\)\([^/@]\+\)\(@quot\|@boldquot\)\?\(@[^/]*\)\?\(/.*\.qm$\):%lang(\2\4) \1\2\3\4\5:
+'"$NO_ALL_NAME$QM"'s:\(.*/'"$NAME"'_\([a-zA-Z]\{2\}\([_@].*\)\?\)\.qm$\):%lang(\2) \1:
 '"$NO_ALL_NAME$QM"'s:\(.*/share/locale/\)\([^/@]\+\)\(@quot\|@boldquot\)\?\(@[^/]*\)\?\(/.*/'"$NAME"'\.qm$\):%lang(\2\4) \1\2\3\4\5:
+'"$ALL_NAME$QM"'s:\(.*/[^/_]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
+'"$ALL_NAME$QM"'s:\(.*/[^/_]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
+'"$ALL_NAME$QM"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}[_@].*\)\.qm$\):%lang(\2) \1:
+'"$ALL_NAME$QM"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\{2\}\)\.qm$\):%lang(\2) \1:
+s:^[^%].*::
 /^[^%]/d
 s:%lang(C) ::' >> $MO_NAME
 
 if [ ! -f __find.dirs ] || [ "$TOP_DIR" -nt __find.dirs ]; then
        find $TOP_DIR -mindepth 1 -type d | sed 's:'"$TOP_DIR"'::' > __find.dirs
 else
-       echo "$PROG: Using cached __find.dirs"
+       echo >&2 "$PROG: Using cached __find.dirs"
 fi
 
 # gnome
This page took 0.130061 seconds and 4 git commands to generate.