From 35379ed2ab965b51ad2a08c5cdf3282ddfa1e03c Mon Sep 17 00:00:00 2001 From: Mohammad Rafiq Date: Thu, 20 Feb 2025 05:54:32 +0800 Subject: [PATCH] feat(homebrew): add homebrew install to bashrc --- .bashrc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.bashrc b/.bashrc index 3dadf77..45e82ba 100644 --- a/.bashrc +++ b/.bashrc @@ -117,6 +117,13 @@ export PATH="$HOME/nvim/bin:$PATH" # Theming export PS1="\[\e[36m\]$(date +'%H:%M:%S')\[\e[32m\]$USER \[\e[35m\]\w \[\e[31m\]$ " +# Check if Homebrew is installed +if ! command -v brew &> /dev/null; then + echo "Homebrew not found. Installing..." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + brew install gcc fastfetch tealdeer neovim thefuck +fi + # Homebrew (Linuxbrew) - Check if it exists first if [ -f /home/linuxbrew/.linuxbrew/bin/brew ]; then eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"