diff options
author | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-11-28 10:33:31 +0000 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz (arab, vxp) <lucio@lucioillanes.de> | 2017-11-28 10:33:31 +0000 |
commit | 9b2278c8b5c696263a5c525adbb7974e854bc520 (patch) | |
tree | 3c5c02ab48c8c08b63960e164de31ba507af5d33 /subr | |
parent | caed76f7988989d6cef19e8902262ffeb98e8246 (diff) | |
download | midipix_build-9b2278c8b5c696263a5c525adbb7974e854bc520.tar.bz2 midipix_build-9b2278c8b5c696263a5c525adbb7974e854bc520.tar.xz |
subr/pkg_install_libs.subr:pkgp_install_lib_link(): prevent recursive link.
Diffstat (limited to 'subr')
-rw-r--r-- | subr/pkg_install_libs.subr | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/subr/pkg_install_libs.subr b/subr/pkg_install_libs.subr index 61d87a56..c4b49c6e 100644 --- a/subr/pkg_install_libs.subr +++ b/subr/pkg_install_libs.subr @@ -19,11 +19,12 @@ pkgp_install_lib_check() { pkgp_install_lib_link() { local _so_path="${1}" _so_dir="${2}" _lib_name="${3}" \ _lib_link_tgt _lib_link_path; + _lib_link_path="${_so_path%.so*}.lib.a"; _lib_link_tgt="$(find "${_so_dir}" \ -name "${_lib_name%%.*}.*.lib.a" |\ sort | tail -1)"; - if [ -n "${_lib_link_tgt}" ]; then - _lib_link_path="${_so_path%.so*}.lib.a"; + if [ -n "${_lib_link_tgt}" ]\ + && [ "${_lib_link_tgt}" != "${_lib_link_path}" ]; then ex_build_fileop rm "${_lib_link_path}"; ex_build_fileop ln_symbolic "$(ex_basename "${_lib_link_tgt}")" \ "${_lib_link_path}"; |