I have a directory full of pkg files that I need to install. I tried "installer -packages *.pkg" , but that didn't work. Any ideas on how to do this? Do I need to make a metapackage?


Use cycle for this. You can type next in your terminal command line:

for f in *.pkg; do installer -packages "$f"; done
| improve this answer | |
  • 2
    Quote the variable: installer -packages "$f" will help avoid things failing or possibly going horribly awry should any of the package files have spaces in their names. – thrig Jun 26 '17 at 14:04
  • @thrig right, thanx! – toma Jun 26 '17 at 14:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .