From ba206621573ae79121343dd48c6d9738655afcae Mon Sep 17 00:00:00 2001 From: dnkmmr <104856296+dnkmmr69420@users.noreply.github.com> Date: Tue, 21 Nov 2023 18:48:05 -0600 Subject: [PATCH 1/3] Added brew to 00-default.just --- build/ublue-os-just/00-default.just | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/build/ublue-os-just/00-default.just b/build/ublue-os-just/00-default.just index 28e996a5..36129af2 100644 --- a/build/ublue-os-just/00-default.just +++ b/build/ublue-os-just/00-default.just @@ -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 From 6a8fa093355787262389b0e8c6cd15df8600950f Mon Sep 17 00:00:00 2001 From: dnkmmr <104856296+dnkmmr69420@users.noreply.github.com> Date: Tue, 21 Nov 2023 18:51:09 -0600 Subject: [PATCH 2/3] Update 00-default.just --- build/ublue-os-just/00-default.just | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/ublue-os-just/00-default.just b/build/ublue-os-just/00-default.just index 36129af2..03d2a0bb 100644 --- a/build/ublue-os-just/00-default.just +++ b/build/ublue-os-just/00-default.just @@ -85,4 +85,4 @@ install-brew-to-shell: # Removes homebrew from system remove-brew: - sudo rm -rf /var/home/linuxbrew + sudo rm -rf /var/home/linuxbrew From c67d2ecfb9ae3b128506ec07b06c632959bfebbb Mon Sep 17 00:00:00 2001 From: dnkmmr <104856296+dnkmmr69420@users.noreply.github.com> Date: Tue, 21 Nov 2023 20:19:02 -0600 Subject: [PATCH 3/3] Update build/ublue-os-just/00-default.just much better Co-authored-by: Jorge O. Castro --- build/ublue-os-just/00-default.just | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build/ublue-os-just/00-default.just b/build/ublue-os-just/00-default.just index 03d2a0bb..ce19e4a3 100644 --- a/build/ublue-os-just/00-default.just +++ b/build/ublue-os-just/00-default.just @@ -57,12 +57,12 @@ remove-distrobox-git: curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/uninstall | sh -s -- --prefix ~/.local # Install Homebrew for Linux -install-brew: +brew-install: 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: +brew-shell: #!/usr/bin/env bash set -euxo pipefail echo "Adding homebrew to shell configuration" @@ -84,5 +84,6 @@ install-brew-to-shell: fi # Removes homebrew from system -remove-brew: - sudo rm -rf /var/home/linuxbrew +brew-remove: + echo "Removing homebrew ..." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"