From 91381251a039e3cc2df3fa8bde2dcbe4f5cbafd7 Mon Sep 17 00:00:00 2001 From: Titus von Boxberg Date: Wed, 19 May 2010 18:08:23 +0200 Subject: 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. diff --git a/scripts/build/internals.sh b/scripts/build/internals.sh index 13239bf..555db36 100644 --- a/scripts/build/internals.sh +++ b/scripts/build/internals.sh @@ -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 -- cgit v0.10.2-6-g49f6