Re: Help with Installation-check
Re: Help with Installation-check
- Subject: Re: Help with Installation-check
- From: Stephane Sudre <email@hidden>
- Date: Fri, 13 Jul 2012 09:27:13 +0200
On Fri, Jul 13, 2012 at 1:54 AM, Michele Corum -X (mcorum - aap3 at
Cisco) <email@hidden> 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden