Some scripts like to use /usr/bin/env to find the interpreter but this

confuses the dependency extractor. We now detect the use of /usr/bin/env
and just pass that on without the arguments.
This commit is contained in:
Tom G. Christensen 2005-12-29 14:35:54 +00:00
parent 82dcedd482
commit 4bbc8a32d1

View File

@ -1050,7 +1050,11 @@ extract_deps()
if [ -L "$interp" ]; then if [ -L "$interp" ]; then
echo $($FILE -h "$interp" | $SED -e 's/.* to //') echo $($FILE -h "$interp" | $SED -e 's/.* to //')
else else
echo $interp if [ "$(echo $interp | $CUT -d' ' -f1)" = "/usr/bin/env" ]; then
echo "/usr/bin/env"
else
echo $interp
fi
fi fi
done | $SORT -u | $XARGS -r $SHOWFILES -- | $AWK '{ print $4 }' | $SORT -u done | $SORT -u | $XARGS -r $SHOWFILES -- | $AWK '{ print $4 }' | $SORT -u
fi fi