makeflist revision 1.8
1#!/bin/sh 2# 3# $NetBSD: makeflist,v 1.8 1998/06/15 14:45:06 lukem Exp $ 4# 5# Print out the files in some or all lists. 6# Usage: makeflist [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...] 7# 8 9# set defaults 10machine=${MACHINE:-`printf 'xxx:\n\techo ${MACHINE}' | make -s -f-`} 11arch=${MACHINE_ARCH:-`printf 'xxx:\n\techo ${MACHINE_ARCH}' | make -s -f-`} 12setd=`pwd` 13nlists="base comp etc games man misc text" 14xlists="xbase xcomp xcontrib xfont xserver" 15lists=$nlists 16 17# handle args 18while : ; do 19 case $1 in 20 -b*) 21 lists="$xlists $nlists" 22 ;; 23 -x*) 24 lists=$xlists 25 ;; 26 -a*) 27 arch=$2; shift 28 ;; 29 -m*) 30 machine=$2; shift 31 ;; 32 -s*) 33 setd=$2; shift 34 ;; 35 -*) 36 cat 1>&2 <<USAGE 37Usage: $0 [-b] [-x] [-a arch] [-m machine] [-s setsdir] [setname ...] 38 -b make netbsd + x11 lists 39 -x only make x11 lists 40 -a arch set arch (e.g, m68k, mips, powerpc) [$arch] 41 -m machine set machine (e.g, amiga, i386, macppc) [$machine] 42 -s setsdir directory to find sets [$setd] 43 [setname ...] sets to build [$lists] 44USAGE 45 exit 1 46 ;; 47 *) 48 break 49 ;; 50 esac 51 shift 52done 53if [ -n "$1" ]; then 54 lists="$@" 55fi 56 57# EXTRA SPECIAL (not done here): secr 58 59for setname in $lists; do 60 cat $setd/lists/$setname/mi 61 if [ "$machine" != "$cpu" -a -f $setd/lists/$setname/ad.${arch} ]; then 62 cat $setd/lists/$setname/ad.${arch} 63 fi 64 if [ -f $setd/lists/$setname/md.${machine} ]; then 65 cat $setd/lists/$setname/md.${machine} 66 fi 67 68 # Split man/md_share into: this machine, other machine 69 if [ $setname = man ]; then 70 grep ${machine} $setd/lists/man/md_share 71 fi 72 if [ $setname = misc ]; then 73 grep -v ${machine} $setd/lists/man/md_share 74 fi 75done | sort -u 76