From c68039132a5bb3015597d2fef32d0e28e08cab36 Mon Sep 17 00:00:00 2001 From: qoijjj <129108030+qoijjj@users.noreply.github.com> Date: Fri, 20 Sep 2024 23:41:28 -0700 Subject: [PATCH] fix: add brew justfile due to upstream move --- .../enable-wheelless-brew-installation.patch | 7 ------ files/scripts/justfilehardening.sh | 3 +-- .../usr/share/ublue-os/just/50-brew.just | 24 +++++++++++++++++++ 3 files changed, 25 insertions(+), 9 deletions(-) delete mode 100644 files/scripts/enable-wheelless-brew-installation.patch create mode 100644 files/system/usr/share/ublue-os/just/50-brew.just diff --git a/files/scripts/enable-wheelless-brew-installation.patch b/files/scripts/enable-wheelless-brew-installation.patch deleted file mode 100644 index 76f8eeb..0000000 --- a/files/scripts/enable-wheelless-brew-installation.patch +++ /dev/null @@ -1,7 +0,0 @@ -20,25d19 -< # if /etc/profile.d/brew.sh already exists, replace it with /usr/etc/profile.d/brew.sh -< if [ -f /etc/profile.d/brew.sh ]; then -< if [ -f /usr/etc/profile.d/brew.sh ]; then -< sudo cp /usr/etc/profile.d/brew.sh /etc/profile.d/brew.sh -< fi -< fi diff --git a/files/scripts/justfilehardening.sh b/files/scripts/justfilehardening.sh index 7593cb5..2aaf5f4 100644 --- a/files/scripts/justfilehardening.sh +++ b/files/scripts/justfilehardening.sh @@ -2,7 +2,6 @@ # Tell build process to exit if there are any errors. set -oue pipefail - -patch /usr/share/ublue-os/just/05-brew.just < enable-wheelless-brew-installation.patch +\ patch /usr/share/ublue-os/just/15-luks.just < use-pkexec-in-luks-just.patch patch /usr/share/ublue-os/just/40-nvidia.just < remove-unusable-just-command.patch diff --git a/files/system/usr/share/ublue-os/just/50-brew.just b/files/system/usr/share/ublue-os/just/50-brew.just new file mode 100644 index 0000000..af36147 --- /dev/null +++ b/files/system/usr/share/ublue-os/just/50-brew.just @@ -0,0 +1,24 @@ +alias brew := install-brew + +# Install Homebrew | https://brew.sh +install-brew: + #!/usr/bin/env bash + source /usr/lib/ujust/ujust.sh + if [[ ! -f "/var/home/linuxbrew/.linuxbrew/bin" || ! -x "/var/home/linuxbrew/.linuxbrew/bin/brew" ]]; then + echo "${b}Brew Installation${n}" + echo "Please ${b}IGNORE${n} everything the installer tells you to do at the end" + echo "We have already done it for you! You just need to close and re-open the terminal after installation" + echo "Do you understand?" + echo "Please type in \"YES I UNDERSTAND\" and press enter" + read ACCEPT + if [ "$ACCEPT" == "YES I UNDERSTAND" ]; then + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + else + echo "Capitalization matters when you type \"YES I UNDERSTAND\"" + fi + fi + +# Removes homebrew from system +remove-brew: + echo "Removing homebrew ..." + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" \ No newline at end of file