Server: appserver-7f0f8755-nginx-15961cad18524ec5a9db05f2a6a7e440
Current directory: /usr/lib/rpm
Software: nginx/1.27.5
Shell Command
Create a new file
Upload file
File: find-lang.sh
#!/bin/bash # findlang - automagically generate list of language specific files # for inclusion in an rpm spec file. # This does assume that the *.mo files are under .../locale/... # Run with no arguments gets a usage message. # findlang is copyright (c) 1998 by W. L. Estes
# Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS # BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN # ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. usage () { cat <
&2 elif [ ! -d $1 ] ; then echo $0: $1: no such directory exit 1 else TOP_DIR="`echo $1|sed -e 's:/$::'`" fi shift if [ -z "$1" ] ; then usage else NAMES[0]=$1 fi shift GNOME=# MATE=# KDE=# QT=# MAN=# HTML=# MO= MO_NAME=${NAMES[0]}.lang ALL_NAME=# NO_ALL_NAME= while test $# -gt 0 ; do case "${1}" in --with-gnome ) GNOME= shift ;; --with-mate ) MATE= shift ;; --with-kde ) KDE= shift ;; --with-qt ) QT= shift ;; --with-man ) MAN= shift ;; --with-html ) HTML= shift ;; --without-mo ) MO=# shift ;; --all-name ) ALL_NAME= NO_ALL_NAME=# shift ;; * ) if [ $MO_NAME != ${NAMES[$#]}.lang ]; then NAMES[${#NAMES[@]}]=$MO_NAME fi MO_NAME=${1} shift ;; esac done if [ -f $MO_NAME ]; then rm $MO_NAME fi for NAME in ${NAMES[@]}; do find "$TOP_DIR" -type f -o -type l|sed ' s:'"$TOP_DIR"':: '"$ALL_NAME$MO"'s:\(.*/locale/\)\([^/_]\+\)\(.*\.mo$\):%lang(\2) \1\2\3: '"$NO_ALL_NAME$MO"'s:\(.*/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:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/'"$NAME"'\)$:%lang(\2) %doc \1\2\3\4/: '"$ALL_NAME$GNOME"'s:\(.*/share/help/\)\([^/_]\+\)\([^/]*\)\(/[a-zA-Z0-9.\_\-]\+\)$:%lang(\2) %doc \1\2\3\4/: 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) :: /^$/d' >> $MO_NAME find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'$\):%dir \1: '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%dir \1: s:^\([^%].*\):: /^$/d' >> $MO_NAME find "$TOP_DIR" -type f|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$GNOME"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\)\.omf\):%lang(\2) \1: '"$ALL_NAME$GNOME"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1: s:^[^%].*:: s:%lang(C) :: /^$/d' >> $MO_NAME find $TOP_DIR -type d|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$MATE"'s:\(.*/mate/help/'"$NAME"'$\):%dir \1: '"$NO_ALL_NAME$MATE"'s:\(.*/mate/help/'"$NAME"'/[a-zA-Z0-9.\_\-]/.\+\):: '"$NO_ALL_NAME$MATE"'s:\(.*/mate/help/'"$NAME"'\/\)\([^/_]\+\):%lang(\2) \1\2: '"$ALL_NAME$MATE"'s:\(.*/mate/help/[a-zA-Z0-9.\_\-]\+$\):%dir \1: '"$ALL_NAME$MATE"'s:\(.*/mate/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]/.\+\):: '"$ALL_NAME$MATE"'s:\(.*/mate/help/[a-zA-Z0-9.\_\-]\+\/\)\([^/_]\+\):%lang(\2) \1\2: s:%lang(.*) .*/mate/help/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+/.*:: s:^\([^%].*\):: s:%lang(C) :: /^$/d' >> $MO_NAME find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$MATE"'s:\(.*/omf/'"$NAME"'$\):%dir \1: '"$ALL_NAME$MATE"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+$\):%dir \1: s:^\([^%].*\):: /^$/d' >> $MO_NAME find "$TOP_DIR" -type f|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$MATE"'s:\(.*/omf/'"$NAME"'/'"$NAME"'-\([^/.]\+\)\.omf\):%lang(\2) \1: '"$ALL_NAME$MATE"'s:\(.*/omf/[a-zA-Z0-9.\_\-]\+/[a-zA-Z0-9.\_\-]\+-\([^/.]\+\)\.omf\):%lang(\2) \1: s:^[^%].*:: s:%lang(C) :: /^$/d' >> $MO_NAME KDE3_HTML=`kde-config --expandvars --install html 2>/dev/null` if [ x"$KDE3_HTML" != x ] && [ -d "$TOP_DIR$KDE3_HTML" ]; then find "$TOP_DIR$KDE3_HTML" -type d|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\):: '"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: /^$/d' >> $MO_NAME fi KDE4_HTML=`kde4-config --expandvars --install html 2>/dev/null` if [ x"$KDE4_HTML" != x ] && [ -d "$TOP_DIR$KDE4_HTML" ]; then find "$TOP_DIR$KDE4_HTML" -type d|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\):: '"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: /^$/d' >> $MO_NAME fi KF5_HTML=`kf5-config --expandvars --install html 2>/dev/null` if [ x"$KF5_HTML" != x ] && [ -d "$TOP_DIR$KF5_HTML" ]; then find "$TOP_DIR$KF5_HTML" -type d|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\):: '"$NO_ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: '"$ALL_NAME$KDE"'s:\(.*/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: /^$/d' >> $MO_NAME fi find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$HTML"'s:\(.*/doc/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'/\):: '"$NO_ALL_NAME$HTML"'s:\(.*/doc/HTML/\)\([^/_]\+\)\(.*/'"$NAME"'\)$:%lang(\2) \1\2\3: '"$ALL_NAME$HTML"'s:\(.*/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+/\):: '"$ALL_NAME$HTML"'s:\(.*/doc/HTML/\)\([^/_]\+\)\(.*/[a-zA-Z0-9.\_\-]\+$\):%lang(\2) \1\2\3: s:^\([^%].*\):: s:%lang(C) :: /^$/d' >> $MO_NAME find "$TOP_DIR" -type f -o -type l|sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$QT"'s:\(.*/'"$NAME"'_\([a-zA-Z]\+\([_@].*\)\?\)\.qm$\):%lang(\2) \1: '"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\+[_@].*\)\.qm$\):%lang(\2) \1: '"$ALL_NAME$QT"'s:^\([^%].*/\([a-zA-Z]\+\)\.qm$\):%lang(\2) \1: '"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\+[_@].*\)\.qm$\):%lang(\2) \1: '"$ALL_NAME$QT"'s:^\([^%].*/[^/_]\+_\([a-zA-Z]\+\)\.qm$\):%lang(\2) \1: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\+[_@].*\)\.qm$\):%lang(\2) \1: '"$ALL_NAME$QT"'s:^\([^%].*/[^/]\+_\([a-zA-Z]\+\)\.qm$\):%lang(\2) \1: s:^[^%].*:: s:%lang(C) :: /^$/d' >> $MO_NAME find "$TOP_DIR" -type d|sed ' s:'"$TOP_DIR"':: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/\):: '"$ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+$\):%lang(\2) \1*: s:^\([^%].*\):: s:%lang(C) :: /^$/d' >> $MO_NAME find "$TOP_DIR" -type f -o -type l|sed -r 's/\.(bz2|gz|xz|lzma|Z)$//g' | sed ' s:'"$TOP_DIR"':: '"$NO_ALL_NAME$MAN"'s:\(.*/man/\([^/_]\+\).*/man[a-z0-9]\+/'"$NAME"'\.[a-z0-9].*\):%lang(\2) \1*: s:^\([^%].*\):: s:%lang(C) :: /^$/d' >> $MO_NAME done # for NAME in ${NAMES[@]} if ! grep -q / $MO_NAME; then echo "No translations found for ${NAME} in ${TOP_DIR}" exit 1 fi exit 0
.
40 Items
Change directory
Remove directory
Rename directory
..
72 Items
Change directory
Remove directory
Rename directory
brp-compress
1.77 KB
Edit
Delete
Copy
Move
Remame
brp-elfperms
0.42 KB
Edit
Delete
Copy
Move
Remame
brp-python-bytecompile
3.81 KB
Edit
Delete
Copy
Move
Remame
brp-python-hardlink
0.62 KB
Edit
Delete
Copy
Move
Remame
brp-remove-la-files
0.32 KB
Edit
Delete
Copy
Move
Remame
brp-strip
0.51 KB
Edit
Delete
Copy
Move
Remame
brp-strip-comment-note
0.79 KB
Edit
Delete
Copy
Move
Remame
brp-strip-static-archive
0.48 KB
Edit
Delete
Copy
Move
Remame
check-buildroot
1.29 KB
Edit
Delete
Copy
Move
Remame
check-files
1.03 KB
Edit
Delete
Copy
Move
Remame
check-prereqs
0.41 KB
Edit
Delete
Copy
Move
Remame
check-rpaths
1.06 KB
Edit
Delete
Copy
Move
Remame
check-rpaths-worker
5.19 KB
Edit
Delete
Copy
Move
Remame
elfdeps
22.23 KB
Edit
Delete
Copy
Move
Remame
fileattrs
13 Items
Change directory
Remove directory
Rename directory
find-lang.sh
8.84 KB
Edit
Delete
Copy
Move
Remame
find-provides
0.09 KB
Edit
Delete
Copy
Move
Remame
find-requires
0.09 KB
Edit
Delete
Copy
Move
Remame
fontconfig.prov
0.48 KB
Edit
Delete
Copy
Move
Remame
macros
41.63 KB
Edit
Delete
Copy
Move
Remame
macros.d
0 Items
Change directory
Remove directory
Rename directory
mkinstalldirs
3.46 KB
Edit
Delete
Copy
Move
Remame
ocamldeps.sh
6.8 KB
Edit
Delete
Copy
Move
Remame
perl.prov
6.28 KB
Edit
Delete
Copy
Move
Remame
perl.req
8.91 KB
Edit
Delete
Copy
Move
Remame
pkgconfigdeps.sh
1.34 KB
Edit
Delete
Copy
Move
Remame
platform
67 Items
Change directory
Remove directory
Rename directory
pythondistdeps.py
27.53 KB
Edit
Delete
Copy
Move
Remame
rpm.daily
0.3 KB
Edit
Delete
Copy
Move
Remame
rpm.supp
0.67 KB
Edit
Delete
Copy
Move
Remame
rpm2cpio.sh
1.56 KB
Edit
Delete
Copy
Move
Remame
rpm_macros_provides.sh
1.27 KB
Edit
Delete
Copy
Move
Remame
rpmdb_dump
0.04 KB
Edit
Delete
Copy
Move
Remame
rpmdb_load
0.04 KB
Edit
Delete
Copy
Move
Remame
rpmdeps
18.9 KB
Edit
Delete
Copy
Move
Remame
rpmpopt-4.18.0
10.54 KB
Edit
Delete
Copy
Move
Remame
rpmrc
17.45 KB
Edit
Delete
Copy
Move
Remame
rpmuncompress
14.9 KB
Edit
Delete
Copy
Move
Remame
script.req
0.31 KB
Edit
Delete
Copy
Move
Remame
tgpg
0.91 KB
Edit
Delete
Copy
Move
Remame