How To Make a Bulk App Installer For a New Mac OS Install using HomeBrew.
When buying a new macOS computer or reformatting an existing one, the most tedious task you have to do is install all your software applications from scratch. First, you have to memorize each, and second, visiting the websites of each application, downloading and installing the application takes forever .
But what if you had a download script that automatically downloaded and installed each one? All you have to do is run the script and then leave and brew yourself some coffee while the script does its job. You can do this with HomeBrew and HomeBrew Cask.
What is HomeBrew?
HomeBrew is a program that can be installed on your macOS computer that downloads and installs applications for you without having to visit the application’s website first. All you need is a terminal window, the Homebrew command, and the name of the application you want to download.
Not all software applications are supported by HomeBrew. I’ll show you in a moment how to find out which ones are supported. But in general, all known ones are supported.
HomeBrew Install
Before we can make our bulk macOS app installer, we need to install HomeBrew and HomeBrew Cask. Cask is a program that allows you to load all programs at once. Both are required for the macOS app installer to work properly.
To install HomeBrew, open a terminal window and type:
– / usr / bin / ruby ??-e “$ (curl -fsSL https: //raw.githubusercontent. Com / Homebrew / install / master / install)”
Then, to install HomeBrew Cask, enter the following two commands separately.
brew tap caskroom / cask brew install caskroom / cask / brew-cask
That’s all. You now have HomeBrew installed.
To install the program with HomeBrew, it’s a simple terminal command
brew cask install “app name”
Obviously, you should replace “application name†with the name of the application you want.
To uninstall, enter:
brew cask uninstall “application name”
Learn about HomeBrew supported software
Before we get into creating a bulk app installer, you need to find out which programs HomeBrew supports. Unless you’re using some old, undefined program that no one has ever heard of, HomeBrew will likely support it.
But you need to see what exactly the program calls HomeBrew for you to understand the command correctly. Otherwise, your bulk install of the app won’t work very well.
So, in Terminal enter:
brew search “name of app”
So if you were looking to see if Google Chrome is supported you can type
brew search chrome
Terminal will now give you all HomeBrew packages related to Chrome.
As you can see, Chrome is listed on HomeBrew as google-chrome. This is why you need to get the exact terminology right in the app installer.
Create your own application installer
Once you have a list of all the apps you want to use in the installer (named in HomeBrew format), it’s time to start writing the script.
Open a macOS text editor (like the default TextEdit) and at the top enter:
#! / Bin / sh
On the next line, start typing HomeBrew Cask commands for each program, separated by
. So like this:
brew cask install google-chrome
brew cask install firefox
brew cask install audacity
brew cask install dropbox
Etc. Continue until you have all the programs listed with HomeBrew cask commands attached.
When you’re done, save the file as:
caskconfig.sh
Take care that the text does not appear at the end of the file name.
Now go back to Terminal, point Terminal to the location of the file you just created and in Terminal enter:
chmod a + x caskconfig.sh
This makes the file ready for use. Transfer the script from your computer to a USB drive or cloud storage. If your computer crashes, having a script on it will make this whole exercise pointless!
Use script on new computer
On a new or reformatted computer, install HomeBrew and HomeBrew Cask as we just showed. Then move caskconfig.sh to your Mac home directory.
Finally, start Terminal and type:
./caskconfig.sh
Now sit back and watch as all the programs in the script are downloaded and installed without any extra effort on your part!
The nice thing about this script is that it just points to online programs. Therefore, when you run the script, you will always receive the latest versions of these programs. Not some very outdated version that requires a dozen patches to be installed.
–