8

I tried to write installer with packagemaker which runs a shell script during installation. I want to pass some arguments to the shell script during silent mode installation. Something similar to

$installer -pkg MyInstaller.pkg -my_argument1 -my_argument2

The two options I can think of are,

  1. Set the environment variables and read those from script. But this does not seem to work.
  2. Write this data to some file and read from it during installation. But it's very ugly way to do this and it is not convenient for my installer's user.

Is there a better way to do it with command line arguments or environments?

Vishal
  • 636
  • 5
  • 8
user1119324
  • 151
  • 1
  • 3
  • The shell script you mentioned is an installer script like preinstall /postinstall script, right? – Vishal Dec 28 '11 at 19:10
  • this would help ! https://stackoverflow.com/questions/55511165/pass-variables-to-the-installer-on-osx-package-installer – PodBlood Aug 11 '20 at 11:40

0 Answers0