Run a Python script from PackageMaker in OSX
-
29-10-2019 - |
Question
I'm having a difficult time finding any decent documentation for packaging on OSX. My package needs to run a Python script that will do some launchd magic right after the app is installed. I tried using -s scripts
with packagemaker and put my script in the directory scripts
, but I had no luck. Is there something I'm missing? More importantly, where is all the packagemaker documentation? How can I get my Python script to run? The only thing I've seen is this, which is way outdated and doesn't cover the command line version.
I don't want to use the GUI; it makes my life too difficult.
Solution
I've resolved this issue.
- The script needs to be named
postflight
and have a proper shebang line. - The script needs to exit with specific status codes (0 for success, which is the default, I believe).
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow