mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-01-30 08:03:59 +00:00
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:
parent
a85fc6dcb7
commit
91381251a0
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user