#!/bin/sh # # $NetBSD: makeobsolete,v 1.10 2002/04/09 06:07:17 tron Exp $ # # Print out the obsolete files for a set # Usage: makeobsolete [-b] [-x] [-a arch] [-m machine] [-s setsdir] \ # [-t target] [setname ...] # # set defaults : ${MAKE=make} machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | $MAKE -s -f-`} arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | $MAKE -s -f-`} setd=`pwd` nlists="base comp etc games man misc text" xlists="xbase xcomp xcontrib xfont xserver xmisc" lists=$nlists target=./dist # handle args while : ; do case $1 in -b*) lists="$xlists $nlists" ;; -x*) lists=$xlists;; -a*) arch=$2; shift ;; -m*) machine=$2; shift ;; -s*) setd=$2; shift ;; -t*) target=$2;shift ;; -*) cat 1>&2 < $file if [ ! -s $file ] ; then rm $file fi done | egrep -v '^#' | sort -ru