Skip to content

Commit d678406

Browse files
rnpridgeonRyan P
authored andcommitted
Update install_name_tool with less agressivde grep filter
1 parent 74e59f8 commit d678406

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tools/fixup-wheels.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,12 @@ fixup_wheel_macosx () {
8282

8383
# Change the name to be local
8484
install_name_tool -id "$lib" $lib
85-
if otool -L $lib | grep -q /usr/local/lib/librdkafka.1.dylib ; then
85+
# Extract existing(old) reference
86+
old=$(otool -L $lib | grep -o '.*librdkafka.1.dylib' | xargs)
87+
if [[ ! -z "$old" ]]; then
8688
# Change the librdkafka reference to load from the same
8789
# directory as the plugin
88-
install_name_tool -change /usr/local/lib/librdkafka.1.dylib '@loader_path/librdkafka.1.dylib' $lib
90+
install_name_tool -change "$old" '@loader_path/librdkafka.1.dylib' $lib
8991
otool -L $lib
9092
else
9193
echo "WARNING: couldn't find librdkafka reference in $lib"

0 commit comments

Comments
 (0)