如何编写将文件保存在地窖中的自制程序?
我正在尝试为 Icon 编程语言编写一个公式(noweb 所必需的),但其二进制发行版在 lib/
目录中包含大量文件(几乎 1000 个)。我想将它们排除在符号链接到 /usr/local/lib
进程之外,因为我只在构建 noweb 时需要依赖项。
有没有办法可以指定装置只能保存在地窖中?
I'm trying to write a formula for the Icon programming language (necessary for noweb), but its binary distribution contains TONS of files (almost 1000) in the lib/
directory. I'd like to leave them out of the symlink-to-/usr/local/lib
process since I only need the dependency when building noweb.
Is there a way I can specify that an installation should be kept in its cellar only?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
啊哈,终于找到命令了。例如:
或者,您可以写信
让它打印以下内容作为理由:“这是因为 OS X 已经提供了公式。”
Aha, finally found the command. Something like:
Alternatively, you may write
to have it print the following as rationale: "This is because the formula is already provided by OS X."
“keg_only”将阻止所有内容被链接。
为了阻止“大多数”内容被链接,您可以将所有内容安装到“libexec”,然后从那里符号链接到bin,或者编写shim脚本到 bin 中调用 libexec 中的内容。许多 Java 程序都使用此方法,请参阅“ActiveMQ”或“Gant”作为示例。
"keg_only" will keep everything from being linked in.
To keep "most" stuff from being linked in, you can install everything to "libexec" and then symlink from there to bin, or write shim-scripts to bin that call things out of libexec. Lots of Java brews use this method, see "ActiveMQ" or "Gant" for examples.