build/internals.sh: Replace nonportable call to stat
authorTitus von Boxberg <titus@v9g.de>
Wed May 19 18:08:23 2010 +0200 (2010-05-19)
changeset 19557d3e9e91dd9a
parent 1954 acae437fddcc
child 1956 79de82f5843d
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.
scripts/build/internals.sh
     1.1 --- a/scripts/build/internals.sh	Wed May 19 18:17:39 2010 +0200
     1.2 +++ b/scripts/build/internals.sh	Wed May 19 18:08:23 2010 +0200
     1.3 @@ -68,7 +68,7 @@
     1.4          # scripts, we don't know if they would in the end spawn a binary...
     1.5          # Just skip symlinks
     1.6          for _t in "${CT_TARGET}-"*; do
     1.7 -            if [ "$( LANG=C stat -c '%F' "${_t}" )" != "symbolic link" ]; then
     1.8 +            if [ ! -L "${_t}" ]; then
     1.9                  CT_DoExecLog ALL mv "${_t}" ".${_t}"
    1.10                  CT_DoExecLog ALL ln ".${CT_TARGET}-wrapper" "${_t}"
    1.11              fi