• 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
Re: Shared code between preinstall/postinstall scripts
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Shared code between preinstall/postinstall scripts


  • Subject: Re: Shared code between preinstall/postinstall scripts
  • From: Philip Petev <email@hidden>
  • Date: Sun, 01 Sep 2013 21:08:16 +0300

I've tried your suggestion, but unfortunately it won't work in this case too, since most of the preinstall scripts should use it and at this point the script hasn't been deployed yet. I can't move the content of those preinstall scripts to the postinstall scripts of those packages, because all these packages have a payload, which requires some operations to be done before the actual deploying.
Right now, the only option, that comes to me in mind, is to echo the content of that script to /tmp and make it executable via the first preinstall script from the first hidden package, but I wanted to know if there can be done anything else.

On August 31, 2013 at 7:01:36 PM, Philip Petev (email@hidden) wrote:

No, the Conor's solution is not an option in this case, because the package is intended to run on a PC, initially without any internet connection. On the other hand, I'm already using an invisible packages, one at the beginning of the distribution with no payload and with only preinstall script and one at the end, also with no payload and with only postinstall script (the dummy preflight/postflight technique), so I could make it your way. I wasn't sure if there could be another way... Anyway, thanks everyone! 


On Sat, Aug 31, 2013 at 6:43 PM, Stephane Sudre <email@hidden> wrote:
It's possible to do that if you put the script either inside a bundle distribution (and probably aside a flat distribution) but Conor already pointed out the problem with this solution.

What you could do instead is to create an invisible package whose sole purpose in life is to install your scripts in /tmp so that the other packages of the distribution can access them when they are installed.


On Sat, Aug 31, 2013 at 4:12 PM, Philip Petev <email@hidden> wrote:
Yeah, I know about that, but these extra resources can be used only by the preinstall/postintall scripts of that package and the other packages can't. I was thinking of a script, which can be used anytime by any preinstall/postinstall package of any package inside the distribution.


On Sat, Aug 31, 2013 at 3:36 PM, Stephane Sudre <email@hidden> wrote:
You can add extra resources to one package that then can be used by the pre/postinstallation scripts of this very same package (they would be accessible at ./).


On Sat, Aug 31, 2013 at 7:55 AM, Philip Petev <email@hidden> wrote:
Is there a way for all preinstall and postinstall scripts to use a shared code, maybe a script inside the package, which every preinstall/postinstall script could use  ? I have a code, which is present in almost all postinstall scripts in my package and I want to simplify the things.  


 _______________________________________________
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



--
Packaging Resources - http://s.sudre.free.fr/Packaging.html



--
A false life is equal to death. Be your true self... like me !!!



--
Packaging Resources - http://s.sudre.free.fr/Packaging.html



--
A false life is equal to death. Be your true self... like me !!!
 _______________________________________________
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

  • Next by Date: Re: Shared code between preinstall/postinstall scripts
  • Next by thread: Re: Shared code between preinstall/postinstall scripts
  • Index(es):
    • Date
    • Thread