• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Postflight Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Postflight Script


  • Subject: Postflight Script
  • From: "Hafen, Keith" <email@hidden>
  • Date: Tue, 8 Dec 2009 17:36:59 -0800
  • Acceptlanguage: en-US
  • Thread-topic: Postflight Script

We have an installer with a postflight script written in KSH.  It needs the installation destination.


Originally it was coded to use $2, as that is what the documentation says it should be.  However whenever the package being installed resides in a directory with a space (or multiple spaces), or if the destination directory contains one or more spaces, this gets fouled up.  The arguments passed to the postflight are not quoted, and so the postflight script gets more arguments.  E.G.

 

Package to install is located in:

/Space Dir/my_app.pkg

And I choose an installation directory of:

/Applications/My App

 

Then when postflight runs, it receives 6 arguments:

                Arg1: /Space

                Arg2: Dir/my_app.pkg

                Arg3: /Applications/My

                Arg4: App

                Arg5: /

                Arg6: /.

 

Now we can pick up the package path from $PACKAGE_PATH, but there does not seem to be a clean way to get the Installation directory.   Our current workaround

is to mash all the arguments together and then try and parse things out ourselves.   This leaves us vulnerable to Apple changing something.

 

Also we have a customer that was installing, and on his system he did not receive 4 arguments as the documentation states, he only had 3 arguments:

 

                Arg1: Path to install package

                Arg2: Install directory

                Arg3: /.

 

Does anyone have any idea why this would be?  He was not using any directories with spaces in it.

 

Thanks

Keith Hafen

Siemens

 

 _______________________________________________
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

  • Follow-Ups:
    • Re: [Apple] Postflight Script
      • From: Ananda Tallur <email@hidden>
  • Prev by Date: Re: Javascript behaves differently, 10.5.8 vs. 10.6.2
  • Next by Date: Re: [Apple] Postflight Script
  • Previous by thread: Re: Re: Javascript behaves differently, 10.5.8 vs. 10.6.2
  • Next by thread: Re: [Apple] Postflight Script
  • Index(es):
    • Date
    • Thread