#!/bin/csh -f #H# This script determines what software is new for the current box. #H# It uses ports on OpenBSD and portage on Gentoo #H# #H# Portage is only sync'd when the script is running on asylum since #H# it is the NFS server for portage. #H# #H# The -s param will cause it to sync only when running on asylum. if ("$1" == "-h") then grep "^#H#" $0 | sed -e 's/^#H# //' exit endif setenv RSYNC_RSH "ssh -oControlMaster=auto -oControlPath=/tmp/ssh-root-%C -oControlPersist=2" #set hostname=`hostname` set OS=`uname -s` if ($OS == "Linux") then # update local sqlite eval `tail -n1 /etc/conf.d/hostname | sed -e 's/^/set /'` #if ($hostname == "laika2.sanitarium.net") then if ($hostname != "asylum") then rsync --verbose --archive --progress --itemize-changes --human-readable --human-readable --cvs-exclude --delete --delete-excluded asylum:/usr/portage/local/metadata/dep/ /var/cache/edb/dep/ rsync --verbose --archive --progress --itemize-changes --human-readable --human-readable --cvs-exclude --delete --exclude=previous.eix --delete-excluded asylum:/usr/portage/local/eix/ /var/cache/eix/ rsync --verbose --archive --progress --itemize-changes --human-readable --human-readable --cvs-exclude --delete --delete-excluded asylum:/usr/portage/local/layman/ /var/lib/layman/ endif # Show what packages have new versions or new USE flags emerge --changed-use --with-bdeps=y --verbose-conflicts -Duvatk $* world xtf endif if ($OS == "OpenBSD") then setenv CVS_RSH /usr/bin/ssh setenv CVSROOT anoncvs@anoncvs1.usa.openbsd.org:/cvs #setenv RSH /usr/bin/rsh cd /usr/ports || exec echo "cant cd to /usr/ports" set VERSION="OPENBSD_`uname -r | sed -e 's/\./_/'`" echo "Updating OpenBSD ports tree from cvs ($VERSION)..." cvs -q up -r$VERSION -PAd || exec echo "Cant cvs update ports." # show what packages are "out of date" exec /usr/ports/infrastructure/build/out-of-date endif