Here is what I am using for command line and in postinstall script and I have name the file to "postinstall.sh".
command line:-
productbuild --component "$appDir" "/Applications" --scripts "../Scripts" --sign "Developer ID Installer: $DEVNAME" "$appName.pkg"
postinstall.sh:-
#!/usr/bin/env bash
open -n -a /Applications/appname.app
exit 0
when package is created and I try to install the application on my mac, Installation runs smooth and app is install under application folder but postinstall script does not for some reason.
please advise if I have missed out something or anything on running the postinstall script would be appreciated.
Thanks in advance
Note : This app is generated by Unity engine.