added command bin/finddep, added copyright headers to misc bin/ scripts

This commit is contained in:
Mark Olesen
2008-12-31 16:16:20 +01:00
parent 7f168dc93c
commit 172b862c47
20 changed files with 562 additions and 161 deletions

View File

@ -67,10 +67,10 @@ set -- $*
# strip out wildcards via sed
while [ "$#" -ge 1 ]
do
wildcard=$1
shift
##DEBUG echo "remove>$wildcard<" 1>&2
dirList=`echo "$dirList" | sed -e "s@${wildcard}[^:]*:@@g"`
wildcard=$1
shift
##DEBUG echo "remove>$wildcard<" 1>&2
dirList=`echo "$dirList" | sed -e "s@${wildcard}[^:]*:@@g"`
done
# split on ':' (and on space as well to avoid any surprises)
@ -83,18 +83,18 @@ set -- $dirList
unset dirList
for dir
do
##DEBUG echo "check>$dir<" 1>&2
#- dirs must exist
if [ -e "$dir" ]
then
#- no duplicate dirs
duplicate=`echo " $dirList " | sed -ne "s@ $dir @DUP@p"`
##DEBUG echo "check>$dir<" 1>&2
#- dirs must exist
if [ -e "$dir" ]
then
#- no duplicate dirs
duplicate=`echo " $dirList " | sed -ne "s@ $dir @DUP@p"`
if [ ! "$duplicate" ]
then
dirList="$dirList $dir"
fi
fi
if [ ! "$duplicate" ]
then
dirList="$dirList $dir"
fi
fi
done
# parse on whitespace