I'm trying to run a package installer from terminal and have it complete with limited interaction from the user. This will need to be ran on any computer.
The bash script I have so far is:
sudo installer -store -pkg "/Users/username/Desktop/test.pkg" -target /
It will not complete and I am getting the following error: installer: Can't load package "/Users/username/Desktop/test.pkg": The requested URL was not found on this server.
Not sure what this error means as I'm a newbie to scripting. Please advise what is needed to fix this.
-storetogether withsudo, you probably don't need that option anyway as it is primarily intend to test package installation before submitting them to the store. Also the error message indicates thatinstallercan't access the package file, is it in a place whererootcan access it? Also, does the package itself work, i.e. can you install it by double-clicking it in Finder? – nohillside Jul 19 '16 at 06:19