#!/bin/sh # # Print out the files in some or all lists. # Usage: makeplist [-a arch] [-m machine] [-s setsdir] [-p prefix] setname pkgname # . ./sets.subr prefix=/ usage() { cat 1>&2 < $filename SELECTDIRS="-maxdepth 0 -type d" SELECTNONDIRS="-maxdepth 0 ! -type d" cd $prefix # # match the directories # xargs echo $SELECTDIRS < $filename | \ while read ignore ignore ignore ignore args; do [ -z "$args" ] && break find $args $SELECTDIRS done | awk '{ print "@dirrm " $1; }' > $dfilename # # match the non-directories # xargs echo $SELECTNONDIRS < $filename | \ while read ignore ignore ignore ignore ignore args; do [ -z "$args" ] && break find $args $SELECTNONDIRS done > $ffilename cd - echo "@cwd $prefix" if [ -s $ffilename ]; then cat $ffilename fi if [ -s $dfilename ]; then sort -r $dfilename fi rm -f $filename $ffilename $dfilename exit 0