Friday, July 6, 2007

Re: [BLUG] Question about yum in RHEL5

On Fri, Jul 06, 2007 at 02:59:55PM -0400, Shei, Shing-Shong wrote:
> Anyone
> knows a good way to do it now? I tried 'yum localinstall'
> but it does not appear to take wildcard.

I don't know about a "good" way (as I tried to avoid RH) but one
way that should work would be to create a bash script like so:

cat << FEOF > localinstall.sh
#!/usr/bin/env bash

# Set these variables as appropriate.
INSTALLPROG="yum localinstall"
INSTALLDIR="/usr/local/rpms"
INSTALLSUFFIX="rpm"

# Note: This will play well with everything but new-lines embedded in
# filenames.

find "$INSTALLDIR" -type f -iname "*.$INSTALLSUFFIX" -exec $INSTALLPROG '{}' \;

FEOF

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

No comments: