Skip to content

Instantly share code, notes, and snippets.

@dragid10
Last active July 14, 2022 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dragid10/afb9b16d72c4f7807938bd28c37f6ad3 to your computer and use it in GitHub Desktop.
Save dragid10/afb9b16d72c4f7807938bd28c37f6ad3 to your computer and use it in GitHub Desktop.
# Only need to execute this when running on mac
set -ex
py_folder=$(ls venv/lib | head -n 1)
cd "venv/lib/$py_folder/site-packages/"
db2_binary=$(ls ibm_db.cpython* | head -n 1)
echo "$db2_binary"
install_name_tool -change libdb2.dylib "$(pwd)/clidriver/lib/libdb2.dylib" "$db2_binary"
if test -f "$PWD/clidriver/lib/libdb2.dylib"; then
rm -rf libdb2.dylib
fi
ln -s "/usr/local/lib/$py_folder/site-packages/clidriver/lib/libdb2.dylib" libdb2.dylib
export DYLD_LIBRARY_PATH="venv/lib/$py_folder/site-packages/clidriver/lib:$DYLD_LIBRARY_PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment