From 035bda4a77f694662720331ef6902eef4b0cc348 Mon Sep 17 00:00:00 2001 From: RJ Trujillo Date: Sat, 27 Jan 2024 17:54:19 -0700 Subject: [PATCH] feat(cli): Enable atuin and ble.sh out of the box Retrieves and extracts ble.sh. Enables both atuin and ble.sh via the bashrc --- toolboxes/bluefin-cli/Containerfile.bluefin-cli | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/toolboxes/bluefin-cli/Containerfile.bluefin-cli b/toolboxes/bluefin-cli/Containerfile.bluefin-cli index b885be0..8fc4484 100644 --- a/toolboxes/bluefin-cli/Containerfile.bluefin-cli +++ b/toolboxes/bluefin-cli/Containerfile.bluefin-cli @@ -19,5 +19,17 @@ RUN apk update && \ mv /home/linuxbrew /home/homebrew && \ rm /toolbox-packages -# Change root shell to BASH -RUN sed -i -e '/^root/s/\/bin\/ash/\/bin\/bash/' /etc/passwd +# Make some symlinks +RUN mkdir -p /usr/local/bin && \ + ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/docker && \ + ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/flatpak && \ + ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/podman && \ + ln -fs /usr/bin/distrobox-host-exec /usr/local/bin/rpm-ostree + +# Use and configure bash with atuin and ble.sh +RUN wget -q $(curl -s https://api.github.com/repos/akinomyoga/ble.sh/releases/latest | grep "browser_download_url" | cut -d '"' -f 4) -O /tmp/ble.tar.xz && \ + mkdir -p /usr/share/blesh && \ + tar xJf /tmp/ble.tar.xz -C /usr/share/blesh --strip-components=1 && \ + echo 'source /usr/share/blesh/ble.sh' >> /etc/bashrc && \ + echo 'eval "$(atuin init bash)"' >> /etc/bashrc && \ + sed -i -e '/^root/s/\/bin\/ash/\/bin\/bash/' /etc/passwd