build/internals.sh: Replace nonportable call to stat

The call to stat to find out if a file is a symlink works only on GNU systems,
and the replacing portable call to readlink is also shorter and more concise code.

yann.morin.1998@anciens.enib.fr:
Apply simpler test, after discussion with author and Arnaud LACOMBE on the ML.
This commit is contained in:
Titus von Boxberg 2010-05-19 18:08:23 +02:00
parent a85fc6dcb7
commit 91381251a0

View File

@ -68,7 +68,7 @@ do_finish() {
# scripts, we don't know if they would in the end spawn a binary...
# Just skip symlinks
for _t in "${CT_TARGET}-"*; do
if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then
if [ ! -L "${_t}" ]; then
CT_DoExecLog ALL mv "${_t}" ".${_t}"
CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}"
fi