#!/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 set HOSTNAME=`hostname` set OS=`uname -s` if ($OS == "Linux") then # update local sqlite if ($HOSTNAME == "laika2.sanitarium.net") then rsync --verbose --archive --progress --inplace asylum:/usr/portage/local/metadata/dep/ /var/cache/edb/dep/ endif # Show what packages have new versions or new USE flags #emerge --newuse --quiet-build -uvDatk world emerge --newuse --with-bdeps=y -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