Completing cask installs

:wave: Hi. Is it currently possible that cask installs complete all the passed in casks even if a particular app happens to already be installed (by cask).

So brew cask install app1 app2 app3 app4 app5 will install all the way from app1-5 even if app2 is already installed. And if not, is it part of a technical decision or simply a low priority at this time?

I’m trying to automate a setup configuration and can’t assume any apps are installed.

Thank you!

I can’t comment on the design decisions underlying brew cask, but a simple solution to your issue:

for c in app1 app2 app3 app4 app5; do
  brew cask install $c
done

For mass installs of a fixed set of formulae/casks, you can also use brew bundle to automate the process. Run brew bundle dump --file=/tmp/my.bundle to dump out the sum total of all Homebrew installs on your machine, edit to taste, then transfer the bundle file to your target machines and brew bundle install --file=/tmp/my.bundle.

Thank you @gromgit. Looping through the apps individually actually takes quite a bit longer… at least it does for brew formula installs.

I’d prefer not to go down the brew bundle path, but may have to. Thanks so much for your reply.

If it’s speed you want, just combine the two things I mentioned:

for c in app1 app2 app3 app4 app5; do
  echo cask \"$c\"
done | brew bundle install --file=-