From 0fe7aba0aee4751c9834ef74a337a367d9ae101a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Garc=C3=ADa?= <4411661+GarciaLnk@users.noreply.github.com> Date: Mon, 23 Dec 2024 05:08:42 +0100 Subject: [PATCH] fix: install bash-prexec with brew on cli bling (#2047) Co-authored-by: Jorge O. Castro --- build_files/base/05-override-install.sh | 3 --- system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh | 4 +++- .../shared/usr/share/ublue-os/homebrew/bluefin-cli.Brewfile | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build_files/base/05-override-install.sh b/build_files/base/05-override-install.sh index 5ffea6bd0d4..c35008708f4 100755 --- a/build_files/base/05-override-install.sh +++ b/build_files/base/05-override-install.sh @@ -41,9 +41,6 @@ install -c -m 0755 /tmp/starship /usr/bin # shellcheck disable=SC2016 echo 'eval "$(starship init bash)"' >> /etc/bashrc -# Bash Prexec -curl --retry 3 -Lo /usr/share/bash-prexec https://raw.githubusercontent.com/rcaloras/bash-preexec/master/bash-preexec.sh - # Topgrade Install pip install --prefix=/usr topgrade diff --git a/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh b/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh index 1fe7719dd95..6a686bd5397 100644 --- a/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh +++ b/system_files/shared/usr/share/ublue-os/bluefin-cli/bling.sh @@ -18,9 +18,11 @@ if [ "$(command -v ug)" ]; then alias xzfgrep='ug -zF' fi +HOMEBREW_PREFIX="${HOMEBREW_PREFIX:-/home/linuxbrew/.linuxbrew}" + if [ "$(basename "$SHELL")" = "bash" ]; then #shellcheck disable=SC1091 - . /usr/share/bash-prexec + [ -f "${HOMEBREW_PREFIX}"/etc/profile.d/bash-preexec.sh ] && . "${HOMEBREW_PREFIX}"/etc/profile.d/bash-preexec.sh [ "$(command -v atuin)" ] && eval "$(atuin init bash)" [ "$(command -v zoxide)" ] && eval "$(zoxide init bash)" elif [ "$(basename "$SHELL")" = "zsh" ]; then diff --git a/system_files/shared/usr/share/ublue-os/homebrew/bluefin-cli.Brewfile b/system_files/shared/usr/share/ublue-os/homebrew/bluefin-cli.Brewfile index 936b409da4d..1393e1dc819 100644 --- a/system_files/shared/usr/share/ublue-os/homebrew/bluefin-cli.Brewfile +++ b/system_files/shared/usr/share/ublue-os/homebrew/bluefin-cli.Brewfile @@ -1,4 +1,5 @@ brew "atuin" +brew "bash-preexec" brew "bat" brew "direnv" brew "dysk"