Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(just): added homebrew installation #158

Merged
merged 3 commits into from
Nov 22, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions build/ublue-os-just/00-default.just
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,34 @@ distrobox-git:
remove-distrobox-git:
echo 'Uninstalling latest git snapshot of Distrobox...'
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/uninstall | sh -s -- --prefix ~/.local

# Install Homebrew for Linux
install-brew:
echo "Installing homebrew ..."
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Add Homebrew to shell rc files
install-brew-to-shell:
#!/usr/bin/env bash
set -euxo pipefail
echo "Adding homebrew to shell configuration"
touch $HOME/.zprofile
touch $HOME/.bash_profile
if grep -q "linuxbrew" $HOME/.zprofile
then
echo "Brew configuration already present in .zprofile"
else
echo "Adding Brew configuration to .zprofile"
echo 'eval "$(/var/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.zprofile
fi
if grep -q "linuxbrew" $HOME/.bash_profile
then
echo "Brew configuration already present in .bash_profile"
else
echo "Adding Brew configuration to .bash_profile"
echo 'eval "$(/var/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile
fi

# Removes homebrew from system
remove-brew:
sudo rm -rf /var/home/linuxbrew
dnkmmr69420 marked this conversation as resolved.
Show resolved Hide resolved