From 9e13bbc29c3f0bf99497bbef1c62d0302657a66e Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 18 May 2019 22:49:55 -0400 Subject: build: Use sed instead of prefix removals --- diff --git a/build b/build index ed7f89c..f4e49b6 100755 --- a/build +++ b/build @@ -208,8 +208,9 @@ install-native: # libfoo.so.x, not libfoo.x.y.z as libtool generates. set -e; \ for link in $(destdir)$(libdir)/*.so; do \ - lib=$$(ls $${link}.* | head -n 1); \ - ln -sf ../../$${lib##*/} $(destdir)$(tgtlibdir)/$${link##*/}; \ + lib=$$(ls $${link}.* | sed 's|^.*/||; q;'); \ + link=$$(printf '%s\n' $${link} | sed 's|^.*/||;'); \ + ln -sf ../../$${lib} $(destdir)$(tgtlibdir)/$${link}; \ done # Remove libitm files. rm -f $(destdir)$(libdir)/libitm.* -- cgit v0.9.1