summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-11-19 19:01:14 +0100
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-11-19 19:01:14 +0100
commit680b7c7cf57110e8b2c8f2a2e5492341bbb882d5 (patch)
treee9112b84beb5c49b3bf1acd36ba45b6f77fa2f13 /subr
parent0ddccef3fa9390e7d8a7fcfb040b0bd3ef2fccdd (diff)
downloadmidipix_build-680b7c7cf57110e8b2c8f2a2e5492341bbb882d5.tar.bz2
midipix_build-680b7c7cf57110e8b2c8f2a2e5492341bbb882d5.tar.xz
subr/tarballs.subr: fix {symbolic,hard} link conversion logic (via Redfoxmoon.)
Diffstat (limited to 'subr')
-rw-r--r--subr/tarballs.subr14
1 files changed, 9 insertions, 5 deletions
diff --git a/subr/tarballs.subr b/subr/tarballs.subr
index abcbad07..303c6522 100644
--- a/subr/tarballs.subr
+++ b/subr/tarballs.subr
@@ -8,11 +8,15 @@ do_tarball_dist() {
insecure_mkdir ${PREFIX_BASENAME}/lib.bak;
tar -C ${PREFIX_BASENAME}/lib -cpf - . | tar -C ${PREFIX_BASENAME}/lib.bak -xpf -;
log_msg info "Backed up ${PREFIX_BASENAME}/lib.";
- for __ in $(find native/lib \( -iname \*.so -or -iname \*.so.\* \) \
- -type l); do
- ___="native/lib/$(readlink -- ${__})";
- if [ -f "${___}" ]; then
- secure_rm ${__}; ln -f -- "${___}" "${__}";
+ for _dtd_lname in $(find native/lib \( \
+ -iname \*.so -or -iname \*.so.\* -or -iname \*.so.\*.\* -or \
+ -iname \*.so.\*.\*.\* \) -and \( -not -iname \*.lib.a \) -and -type l); do
+ if [ "${_dtd_lname#/}" = "${_dtd_lname}" ]; then
+ _dtd_lname="${PWD}/${_dtd_lname}";
+ fi;
+ _dtd_fname="$(readlink -f -- ${_dtd_lname})";
+ if [ -f "${_dtd_fname}" ]; then
+ secure_rm ${_dtd_lname}; ln -f -- "${_dtd_fname}" "${_dtd_lname}";
fi;
done;
log_msg info "Converted symbolic links in ${PREFIX_BASENAME}/lib to hard links.";