【发布时间】:2018-02-26 16:45:11
【问题描述】:
我想在脚本中更改 dylib 搜索路径。 在终端中我使用 otool -L my.dylib,然后查看搜索路径是什么并使用 install_name_tool 更改它。 install_name_tool (-change) 使用以前的路径和新路径作为参数。 如何将 otool -L 的结果获取到脚本变量?
【问题讨论】:
标签: bash macos otool install-name-tool
我想在脚本中更改 dylib 搜索路径。 在终端中我使用 otool -L my.dylib,然后查看搜索路径是什么并使用 install_name_tool 更改它。 install_name_tool (-change) 使用以前的路径和新路径作为参数。 如何将 otool -L 的结果获取到脚本变量?
【问题讨论】:
标签: bash macos otool install-name-tool
如何将 otool -L 的结果获取到脚本变量中?
从脚本运行 otool:
OUTPUT=$(otool -L /Applications/Calculator.app/Contents/MacOS/Calculator)
echo $OUTPUT
【讨论】: