Articles‎ > ‎

Using Apple Remote Desktop send unix Command to install packages

posted Dec 23, 2008, 10:02 AM by Philip Rinehart   [ updated Dec 23, 2008, 10:05 AM by Greg Neagle ]
by Steve Hayman

Installing Packages

installer -pkg /Some/Package.pkg -target /

Install a specific package on the root disk.

cd /Volumes/Somewhere/SharedPackages
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.