Skip to content

Instantly share code, notes, and snippets.

@lorenzoriano
Created January 7, 2016 16:57
Show Gist options
  • Save lorenzoriano/3090ec7aac0f7465a0a1 to your computer and use it in GitHub Desktop.
Save lorenzoriano/3090ec7aac0f7465a0a1 to your computer and use it in GitHub Desktop.
This script prints the filenames of any dylibs that depend on the System Python, and changes them
#!/bin/bash
#echo "This script prints the filenames of any dylibs in your /opt/ros/indigo/lib that depend on the System Python"
echo "This script prints the filenames of any dylibs in your /usr/local/ that depend on the System Python"
#for f in `find /usr/local/lib`; do
for f in `find /opt/ros/indigo/lib`; do
otool -L "$f" 2> /dev/null| grep Python | grep System &> /dev/null
status=$?
if [ $status -eq 0 ]; then
echo "$status: $f"
# install_name_tool -change /System/Library/Frameworks/Python.framework/Versions/2.7/Python /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Python $f
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment