8 ## A colon (':') separated list of files already read.
9 ## Must be initialized to ":".
11 ## A newline separated of element (support Shell Patterns) to exclude.
13 ## The separator used in list for the output
17 ## A list of elements separated by the separator given in $separator.
18 ## The new elements will be appended to the list.
24 if [ ":$onelist:" = "::" ] ; then return ; fi
25 if [ ! -f $onelist ] ; then return ; fi
26 if [ ":${filelist##*:$onelist:*}:" = "::" ] ; then return ; fi
27 filelist
=":$onelist$filelist"
29 onelistcontent
=`cat $onelist | sed "s=[ \t]*$==g" | while read line ; do echo -n $line ; echo -n ":" ; done`
33 for line
in $onelistcontent ; do
35 if [ ":$line:" = ":$line2:" ] ; then
36 for linex
in $excludelist ; do
37 if [ ":${line##$linex}:" = "::" ] ; then line
="" ; fi
39 if [ ":$line:" != "::" ] ; then
40 if [ ":$list:" = "::" ] ; then
43 list
="$list$separator$line"
47 line3
=${line2##include }
48 if [ ":$line3:" != ":$line2:" -a ":$line3:" != "::" ] ; then
60 readlist
"$excludefile"
67 readlist
"$includefile"
68 echo "$list" |
sort |
uniq