Re: Thanks Rick

Rick Johnson <[email protected]>
Newsgroups gmane.linux.redhat.release.phoebe
Organization Medata, Inc.
Message-ID <[email protected]>
Benjamin Vander Jagt wrote:
> Cool!  Would it work to say this?
> 
> for srpm in *.src.rpm 
>  do rpmbuild --rebuild --target=i686 --nodeps --quiet $srpm %% rm -f $srpm
> done

I'd use && vs %% for conditional completion, but probably the same effect.

> 
> Essentially, I want it to delete the srpm after rebuilding it.  That
> way, if it gets cut off for whatever reason, it will just pick up where
> it left off.

Correct - and if not successful, it won't delete.

> Better yet, is there a way to have it rename srpms if it gets an error
> with rebuilding?

mv "$srpm" "${srpm}.compiled" might work after the build command.

> I have a book on Red Hat 6.something.  I'll see if I can find some
> scripting language info in there...maybe I'll actually learn something
> today...

I prefer the Advanced Bash Scripting Guide. Googling for that will turn 
up it's location. It's immensely useful in my day-to-day BASH scripting.

HTH,
-Rick
-- 
Rick Johnson, RHCE #807302311706007 - [email protected]
Linux/Network Administrator - Medata, Inc. (from home)
PGP Public Key: https://mail.medata.com/pgp/rjohnson.asc



-- 
Phoebe-list mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/phoebe-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.