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:
parent
82dcedd482
commit
4bbc8a32d1
@ -1049,9 +1049,13 @@ extract_deps()
|
|||||||
interp="$($HEAD -n 1 $f | $CUT -d\! -f2- | $SED -e 's/ -.*//')"
|
interp="$($HEAD -n 1 $f | $CUT -d\! -f2- | $SED -e 's/ -.*//')"
|
||||||
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
|
||||||
|
if [ "$(echo $interp | $CUT -d' ' -f1)" = "/usr/bin/env" ]; then
|
||||||
|
echo "/usr/bin/env"
|
||||||
else
|
else
|
||||||
echo $interp
|
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
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user