On Tuesday 04 November 2003 23:03, Erwin Lang wrote: > Am Dienstag, 4. November 2003 14:51 schrieb Doug Weimer: > > On Tue, 2003-11-04 at 05:38, Erwin Lang wrote: > > > with this command I can install a prebuild package on a pc. but I want > > > to know how I can avoid to build the same package every week if there > > > is no new version available (as I said, emerge --buildpkg builds a > > > package regardless if there already exist a "packaged" version of this > > > package in /usr/portage/ packages or not.). Assume a script execute > > > once a week: `emerge --buildpkg apache tomcat samba ... (and other > > > packages I need)`. So I don't have to build packages manually if there > > > is a new version available. And I also need'n look for new versions of > > > certain packages in portage. > > > > You can use the --update option along with buildpkg. Assuming you don't > > unmerge the packages after you build them, using 'emerge --update > > --buildpkg packagename' will only build a new package if a new version > > is available.. > > 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 -- [EMAIL PROTECTED] mailing list