]> git.pld-linux.org Git - packages/rpm-build-macros.git/commitdiff
- add -o (output) and -a (append) options
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 15 Feb 2008 00:07:53 +0000 (00:07 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-find-lang -> 1.31

rpm-find-lang

index bf84b34ebd3ed9663fcf146672c67d0cc47061ad..bfc5a35c9ed2ea997fb92a2add1b97724b159ebf 100644 (file)
@@ -54,6 +54,8 @@ Additional options:
   --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 @@ else
 fi
 shift
 
-echo "$PROG $VERSION: find-lang for '$NAME'"
-
 GNOME='#'
 KDE='#'
 OMF='#'
@@ -87,6 +87,7 @@ MO=''
 MO_NAME=$NAME.lang
 ALL_NAME='#'
 NO_ALL_NAME=''
+APPEND=''
 while test $# -gt 0 ; do
     case "$1" in
        --with-gnome)
@@ -115,14 +116,27 @@ while test $# -gt 0 ; do
                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 | \
This page took 0.06964 seconds and 4 git commands to generate.