#!/bin/sh PKGS_REPO=/home/installs/PKGs # Move all recently built packages into our packages repository mkdir -p $PKGS_REPO find /tmp -name \*.t\?z -maxdepth 1 -exec mv {} $PKGS_REPO \; # Clean up said repository of obsolete (not installed) packages cd $PKGS_REPO for i in *.t?z; do [ ! -e /var/adm/packages/${i%.t?z} ] && rm $i; done