fix(bash): remove homebrew section

This commit is contained in:
Mohammad Rafiq 2025-02-20 21:54:10 +08:00
parent a7b8a29d6b
commit c2d0bb3970

17
.bashrc
View file

@ -1,6 +1,6 @@
# Pull the latest changes from the remote (but only once!) # Pull the latest changes from the remote (but only once!)
if ! [ -v REPO_INITIALISED ]; then if ! [ -v REPO_INITIALISED ]; then
git pull origin main --quiet && export REPO_INITIALISED=true cd ~ && git pull origin main --quiet && export REPO_INITIALISED=true
echo "dotfiles loaded!" echo "dotfiles loaded!"
fi fi
@ -117,21 +117,6 @@ export PATH="$HOME/nvim/bin:$PATH"
# Theming # Theming
export PS1="\[\e[36m\]$(date +'%H:%M:%S')\[\e[32m\]$USER \[\e[35m\]\w \[\e[31m\]$ " 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)"
# thefuck
eval $(thefuck --alias)
fi
# Path Setting - Make sure $HOME/bin exists and only add it once. # Path Setting - Make sure $HOME/bin exists and only add it once.
if [ -d "$HOME/bin" ] && ! echo "$PATH" | grep -q "$HOME/bin"; then if [ -d "$HOME/bin" ] && ! echo "$PATH" | grep -q "$HOME/bin"; then
export PATH="$HOME/bin:$PATH" export PATH="$HOME/bin:$PATH"