Install HomeBrew (Linux)

PHOTO EMBED

Wed Feb 02 2022 22:12:47 GMT+0000 (Coordinated Universal Time)

Saved by @jimbrig #installation #linux #bash #wsl

!#/usr/bin/env bash

# update and ensure build-essentials/git
sudo apt update
sudo apt-get install build-essential curl file git

# install homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

# add to PATH
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> /home/jimbrig/.profile
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
source ~/.profile

# test
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile

brew doctor

# gcc installation
brew install gcc

# initial installations
brew install topgrade git-crypt git-cliff
content_copyCOPY

- Adds necessary startup commands to `~/.profile` by default instead of `~/.bashrc` or `~/.zshrc`. - Adds to `%PATH%` and refreshes - Runs `brew doctor` - Installs `gcc` post homebrew installation - Uninstall via `/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"` (See [uninstall.sh](https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh) Some initial installations here are: - TopGrade - Git-Crypt - Git-Cliff
https://github.com/jimbrig/dotfiles-wsl/blob/main/scripts/dev/scripts/install-homebrew.sh