On Thu, 15 Feb 2001, Jonathan Wilson wrote:


> if  [ "$1" != *.src.rpm ] && [ "$1" != *.srpm ]

I didn't notice the above line in my previous post.
Unfortunatly, the file globing is expanding to multiple
arguments.

You will have to use a `case' statement or other trickery.

Maybe like this:

  if [ ! -z "${1##*.src.rpm}" ] && [ ! -z "${1##*.srpm}" ]
  then
         .
         .
         .
         .
  else
         .
         .
         .
  fi

-or-

 case "$1" in
 (*.src.rpm | *.srpm)
         .
         .
         .
         ;;
  (*)
         .
         .
         .
         ;;
  esac


-- 
John Darrah (u05192)    | Dept: N/C Programming
Giddens Industries      | Ph: (425) 353-0405 #229
PO box 3190             | Ph: (206) 767-4212 #229
Everett  WA    98203    | Fx: (206) 764-9639



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to