This Bash script automates the installation of Homebrew, packages, and casks on macOS. It's particularly useful for setting up a development or testing environment, especially for security professionals who require specific packages for their work.
- Installs Homebrew if not already installed.
- Creates or updates package lists in
brew_packages.txt
andbrew_casks.txt
. - Generates an installation script,
install_brew_packages.sh
, for easy package and cask installations.
Before running this script, ensure you have the following prerequisites:
- A macOS operating system.
- An internet connection to download Homebrew and packages.
-
Clone this repository to your local machine or download the script directly.
-
Open your terminal and navigate to the directory containing the script.
-
Make the script executable by running:
chmod +x install_brew_packages.sh
-
Run the script:
./install_brew_packages.sh
-
The script will check if Homebrew is installed. If not, it will install Homebrew.
-
It will also check for the existence of package lists (
brew_packages.txt
andbrew_casks.txt
). If they don't exist, it will generate them based on your system's installed packages. -
The script will create an installation script (
install_brew_packages.sh
) that lists the packages and casks for installation. -
Finally, you can run the generated
install_brew_packages.sh
script to install the specified packages and casks.
You can customize this script by:
- Adding or removing packages and casks from the
brew_packages.txt
andbrew_casks.txt
files. - Modifying the
security_tools
array to include additional security testing tools you require.
This script is open-source and released under the MIT License. Feel free to use, modify, and distribute it.