summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsL1pKn072022-03-02 21:41:26 +0100
committersL1pKn072022-03-02 21:41:26 +0100
commitc84655a5d5cdcc41d60582e3be9250ba3f52e610 (patch)
tree1e1d5a0c66d2d585bd53d452cc1de005d9eb78f2
parent33a5490b3ce2b929fcfdffbff14804618c34b042 (diff)
downloadaur-c84655a5d5cdcc41d60582e3be9250ba3f52e610.tar.gz
update _create_links() function
-rw-r--r--PKGBUILD4
1 files changed, 2 insertions, 2 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 145c46b48927..a0ab6d75c403 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -38,9 +38,9 @@ options=('!strip')
_create_links() {
# create soname links
- for _lib in $(find "${pkgdir}" -name '*.so*' -type f); do
+ find "$pkgdir" -type f -name '*.so*' -print0 | while read -d $'\0' _lib; do
_soname=$(dirname "${_lib}")/$(readelf -d "${_lib}" | grep -Po 'SONAME.*: \[\K[^]]*' || true)
- _base=$(echo ${_soname} | sed -r 's/(.*).so.*/\1.so/')
+ _base=$(echo ${_soname} | sed -r 's/(.*)\.so.*/\1.so/')
[[ -e "${_soname}" ]] || ln -s $(basename "${_lib}") "${_soname}"
[[ -e "${_base}" ]] || ln -s $(basename "${_soname}") "${_base}"
done