PackageMaker “Result of Script” requirement never passes

余生长醉 提交于 2019-12-05 21:33:28

It's probably too late for you but I feel like this should be documented somewhere.

I'd been looking around for an answer for this for most of this morning. Long story short I ended up looking at generic bash scripting and I found some info about returning values from a script called by a script. Here's how it can be done:

Anywhere you'd be using exit 0 (for success) use $(exit 1).

As you'd expect exit 1 should be replaced by $(exit 0).

I realize that it's backwards and I don't really get the reasoning behind it but after some experimentation that's what I found.

Well, this isn't exactly an answer to the question, but it did end up being a solution to my problem. This freeware packaging utility called Packages supports the "Result of Script" functionality and handles the path correctly. Unfortunately the packages it creates are only compatible with OS 10.5 and later. To support 10.4, I'm building a separate installer using PackageMaker but skipping the "Result of Script" requirement.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!