#!/bin/sh
# add-dir filename directories-to-search expression-to-define #######
ITEM=$1
for v in $2 ; do
if xbin/exists $v/${ITEM}  > /dev/null ; then echo $3 | sed -e 's:$v:'$v':g' >> makedefs ;
echo adding $3 | sed -e 's:$v:'$v':g'
exit 0;
fi ;
done
echo '#could not find' $1 in $2 1>&2
echo Using: $3 | sed -e 's:$v:unknown:g' 1>&2
echo '#could not find' $1 so using: >> makedefs
echo $3 | sed -e 's:$v:unknown:g' >> makedefs
exit 0


