SOURCES: rpm-find-lang - add -o (output) and -a (append) options
glen
glen at pld-linux.org
Fri Feb 15 01:07:58 CET 2008
Author: glen Date: Fri Feb 15 00:07:58 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- add -o (output) and -a (append) options
---- Files affected:
SOURCES:
rpm-find-lang (1.30 -> 1.31)
---- Diffs:
================================================================
Index: SOURCES/rpm-find-lang
diff -u SOURCES/rpm-find-lang:1.30 SOURCES/rpm-find-lang:1.31
--- SOURCES/rpm-find-lang:1.30 Fri Feb 15 01:06:39 2008
+++ SOURCES/rpm-find-lang Fri Feb 15 01:07:53 2008
@@ -54,6 +54,8 @@
--with-omf find OMF files
--all-name match all package/domain names
--without-mo skip *.mo locale files
+ -o NAME output will be saved to NAME
+ -a NAME output will be appended to NAME
EOF
exit 1
}
@@ -78,8 +80,6 @@
fi
shift
-echo "$PROG $VERSION: find-lang for '$NAME'"
-
GNOME='#'
KDE='#'
OMF='#'
@@ -87,6 +87,7 @@
MO_NAME=$NAME.lang
ALL_NAME='#'
NO_ALL_NAME=''
+APPEND=''
while test $# -gt 0 ; do
case "$1" in
--with-gnome)
@@ -115,14 +116,27 @@
NO_ALL_NAME='#'
shift
;;
- * )
+ -o)
+ shift
+ MO_NAME=$1
+ shift
+ ;;
+ -a)
+ shift
+ MO_NAME=$1
+ APPEND='>'
+ shift
+ ;;
+ *)
MO_NAME=$1
shift
;;
esac
-done
+done
+
+echo "$PROG/$VERSION: find-lang '$NAME' $APPEND> $MO_NAME"
-echo '%defattr(644,root,root,755)' > $MO_NAME
+[ -z "$APPEND" ] && echo '%defattr(644,root,root,755)' > $MO_NAME
if [ ! -f __find.files ] || [ "$TOP_DIR" -nt __find.files ]; then
find $TOP_DIR -xtype f -name '*.mo' | xargs -r file -L | \
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm-find-lang?r1=1.30&r2=1.31&f=u
More information about the pld-cvs-commit
mailing list