1 #!/bin/sh 2 # 3 # $NetBSD: makeflist,v 1.67 2003/12/29 03:13:25 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 . ./sets.subr 10 lists=$nlists 11 12 usage() 13 { 14 cat 1>&2 <<USAGE 15 Usage: ${0##*/} [-b] [-x] [-o] [-a arch] [-m machine] [-s setsdir] 16 [setname [...]] 17 -b print netbsd + x11 lists 18 -x print make x11 lists 19 -o only match obsolete files 20 -a arch set arch (e.g, m68k, mipseb, mipsel, powerpc) [$machine_arch] 21 -m machine set machine (e.g, amiga, i386, macppc) [$machine] 22 -s setsdir directory to find sets [$setsdir] 23 [setname [...]] sets to build [$lists] 24 USAGE 25 exit 1 26 } 27 28 # handle args 29 while getopts bxoa:m:s: ch; do 30 case ${ch} in 31 b) 32 lists="$xlists $nlists" 33 ;; 34 x) 35 lists="$xlists" 36 ;; 37 o) 38 obsolete=1 39 ;; 40 a) 41 machine_arch=${OPTARG} 42 machine_cpu=$(arch_to_cpu ${OPTARG}) 43 ;; 44 m) 45 machine=${OPTARG} 46 ;; 47 s) 48 setsdir=${OPTARG} 49 ;; 50 *) 51 usage 52 ;; 53 esac 54 done 55 shift $((${OPTIND} - 1)) 56 if [ -n "$1" ]; then 57 lists="$@" 58 fi 59 60 for setname in $lists; do 61 list_set_files $setname 62 done | awk '{print $1}' | sort -u 63