diff --git a/util/build-gnu.sh b/util/build-gnu.sh index 0937bcc631f..dfefa6d2641 100755 --- a/util/build-gnu.sh +++ b/util/build-gnu.sh @@ -89,7 +89,7 @@ cd - export CARGOFLAGS # tell to make "${MAKE}" UTILS=install -ln -vf "${UU_BUILD_DIR}/install" "${UU_BUILD_DIR}/ginstall" # The GNU tests use renamed install to ginstall +[ -e "${UU_BUILD_DIR}/ginstall" ] || ln -vf "${UU_BUILD_DIR}/install" "${UU_BUILD_DIR}/ginstall" # The GNU tests use renamed install to ginstall if [ "${SELINUX_ENABLED}" = 1 ];then # Build few utils for SELinux for faster build. MULTICALL=y fails... "${MAKE}" UTILS="cat chcon chmod cp cut dd echo env groups id ln ls mkdir mkfifo mknod mktemp mv printf rm rmdir runcon seq stat test touch tr true uname wc whoami" @@ -97,7 +97,7 @@ else # Use MULTICALL=y for faster build "${MAKE}" MULTICALL=y SKIP_UTILS="install more" for binary in $("${UU_BUILD_DIR}"/coreutils --list) - do ln -vf "${UU_BUILD_DIR}/coreutils" "${UU_BUILD_DIR}/${binary}" + do [ -e "${UU_BUILD_DIR}/${binary}" ] || ln -vf "${UU_BUILD_DIR}/coreutils" "${UU_BUILD_DIR}/${binary}" done fi