posted Dec 23, 2008, 10:02 AM by Philip Rinehart
updated Dec 23, 2008, 10:05 AM by Greg Neagle
by Steve Hayman
installer -pkg /Some/Package.pkg -target /
Install a specific package on the root disk.
for p in *.pkg; do
if test -d /Library/Receipts/$p; then
echo Package $p already installed
installer -pkg $p -target /
Installs all needed packages from a shared folder. Look in a shared folder - in this case, /Volumes/Somewhere/SharedPackages - and for each package we find there, take a look in our receipts folder to see if we have a receipt by the same name (indicating we've already installed that package), and if not, install it.