On Fri, Jul 13, 2012 at 1:54 AM, Michele Corum -X (mcorum - aap3 at Cisco) <mcorum@cisco.com> wrote:
Help! I'm running in circles here and could use some input.
I am needing to create an installation-check in a flat package. I've created my script (see below) and it runs correctly. However once I place it inside the Resources folder in the package and add it the coding to Distribution, it fails. What am I doing wrong?
My script (installation-check.sh)
#!/bin/sh if [ -e "/Library/Preferences/com.foobar.plist" ]; then $(exit 1) else $(exit 0) fi
My coding inside DistributionÅ .
<installation-check script="pm_install_check();"/> <script>function pm_install_check() { if(!(system.run('./Resources/installation-check.sh') == true)) { my.result.title = 'Error!'; my.result.message = 'File already installed.'; my.result.type = 'Fatal'; return false; } return true; } </script>
As mentioned partially in 2 other recent threads: - an embedded script is not in the Resources folder in a flat distribution. It is extracted from a Scripts archive which is located at the same level as the Resources "folder" in the pkg/xar archive. - the script once extracted is available at "./" - this is only supported on Mac OS X 10.6 and later. _______________________________________________ Do not post admin requests to the list. They will be ignored. Installer-dev mailing list (Installer-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/installer-dev/site_archiver%40lists.... This email sent to site_archiver@lists.apple.com