From e47e80a56f42429dde3a1eab54d588663fda06c3 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:34:50 -0500 Subject: [PATCH] fix: fish homebrew completions weren't sourced fix: Brew Cellar stored by hostname --- quadlets/bluefin-cli/bluefin-dx-cli.container | 2 +- .../etc/profile.d/00-bluefin-cli-brew-firstrun.sh | 4 ---- .../bluefin-cli/files/etc/profile.d/homebrew-env.sh | 10 ++++++++++ .../files/usr/share/fish/vendor_conf.d/brew.fish | 9 +++++++++ 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 toolboxes/bluefin-cli/files/etc/profile.d/homebrew-env.sh diff --git a/quadlets/bluefin-cli/bluefin-dx-cli.container b/quadlets/bluefin-cli/bluefin-dx-cli.container index 011339d..d9262a2 100644 --- a/quadlets/bluefin-cli/bluefin-dx-cli.container +++ b/quadlets/bluefin-cli/bluefin-dx-cli.container @@ -13,7 +13,7 @@ Environment=USERNAME=%u Environment=container=podman Exec=--verbose --name %u --user %U --group %G --home %h --init "0" --nvidia "1" --pre-init-hooks " " --additional-packages " " -- " " Image=ghcr.io/ublue-os/bluefin-dx-cli:latest -HostName=bluefin.%l +HostName=bluefin-dx.%l Network=host PodmanArgs=--entrypoint /usr/bin/entrypoint PodmanArgs=--ipc host diff --git a/toolboxes/bluefin-cli/files/etc/profile.d/00-bluefin-cli-brew-firstrun.sh b/toolboxes/bluefin-cli/files/etc/profile.d/00-bluefin-cli-brew-firstrun.sh index 1f99684..29f450f 100644 --- a/toolboxes/bluefin-cli/files/etc/profile.d/00-bluefin-cli-brew-firstrun.sh +++ b/toolboxes/bluefin-cli/files/etc/profile.d/00-bluefin-cli-brew-firstrun.sh @@ -3,10 +3,6 @@ if test "$(id -u)" -gt "0"; then blue=$(printf '\033[38;5;32m') bold=$(printf '\033[1m') normal=$(printf '\033[0m') - HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew - export HOMEBREW_REPOSITORY - HOMEBREW_NO_AUTO_UPDATE=0 - export HOMEBREW_NO_AUTO_UPDATE if test ! -f /etc/linuxbrew.firstrun; then printf "\nBluefin-CLI First Run Setup\n\n" printf "Setting up sudo for %s%s%s%s...\t\t\t " "$bold" "$blue" "$USER" "$normal" diff --git a/toolboxes/bluefin-cli/files/etc/profile.d/homebrew-env.sh b/toolboxes/bluefin-cli/files/etc/profile.d/homebrew-env.sh new file mode 100644 index 0000000..8fe8879 --- /dev/null +++ b/toolboxes/bluefin-cli/files/etc/profile.d/homebrew-env.sh @@ -0,0 +1,10 @@ +# shellcheck shell=sh + +PATH="$PATH:/home/linuxbrew/.linuxbrew/sbin" +export PATH +HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew" +export HOMEBREW_REPOSITORY +HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" +export HOMEBREW_PREFIX +HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar" +export HOMEBREW_CELLAR \ No newline at end of file diff --git a/toolboxes/bluefin-cli/files/usr/share/fish/vendor_conf.d/brew.fish b/toolboxes/bluefin-cli/files/usr/share/fish/vendor_conf.d/brew.fish index 511fb5c..e702181 100644 --- a/toolboxes/bluefin-cli/files/usr/share/fish/vendor_conf.d/brew.fish +++ b/toolboxes/bluefin-cli/files/usr/share/fish/vendor_conf.d/brew.fish @@ -3,4 +3,13 @@ if test "$(id -u)" -gt "0" set -gx HOMEBREW_PREFIX /home/linuxbrew/.linuxbrew set -gx HOMEBREW_CELLAR /home/linuxbrew/.linuxbrew/Cellar set -gx HOMEBREW_REPOSITORY /home/linuxbrew/.linuxbrew + if ! test -L (brew --prefix)"/share/fish/completions" + brew completions link + end + if test -d (brew --prefix)"/share/fish/completions" + set -p fish_complete_path (brew --prefix)/share/fish/completions + end + if test -d (brew --prefix)"/share/fish/vendor_completions.d" + set -p fish_complete_path (brew --prefix)/share/fish/vendor_completions.d + end end \ No newline at end of file