4

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?

1 Answer 1

10

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

for f in *.pkg; do installer -packages "$f"; done 
2
  • 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. Commented Jun 26, 2017 at 14:04
  • @thrig right, thanx! Commented Jun 26, 2017 at 14:05

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.