On Wednesday 05 November 2003 23:30, Jason Stubbs wrote: > > But this only works if all the packages I want to keep up to date are > > installed on that one pc which builds the packages. > > How about the following? > > > #!/bin/sh > PKGDIR="/usr/portage/packages/All" > > for i in $*; > do > VERSION=`emerge -s "^${1}$" 2>&1 | grep available | awk '{print > substr($0, 33)}'` > PKG="${PKGDIR}/${1}-${VERSION}.tbz2" > [ -e ${PKG} ] || emerge -B ${1} > done
Whoops! I got it working and then added the loop. Try: #!/bin/sh PKGDIR="/usr/portage/packages/All" for i in $*; do VERSION=`emerge -s "^${i}$" 2>&1 | grep available | awk '{print substr($0, 33)}'` PKG="${PKGDIR}/${i}-${VERSION}.tbz2" [ -e ${PKG} ] || emerge --nodeps -B ${i} done Of course this will only work if you have the necessary deps to build a package installed. I added --nodeps as well because some packages will build but wont run without the deps. To use it successfully you'll have to confirm for each package before setting it up to run automatically. Jason -- [EMAIL PROTECTED] mailing list