#!/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 if ($HOSTNAME == "asylum") then if ("$1" == "-s") then # use eix to sync. This updates eix's index and tells me what is new in the portage tree. eix-sync || exec echo "Problem syncing." endif endif # Show what packages have new versions or new USE flags exec emerge --newuse -uvDatk world 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/\./_/'`" if ($1 != "-q") then echo "Updating OpenBSD ports tree from cvs ($VERSION)..." cvs -q up -r$VERSION -PAd || exec echo "Cant cvs update ports." endif # show what packages are "out of date" exec /usr/ports/infrastructure/build/out-of-date endif