Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b55076b

Browse files
committed
feat(bluefin-cli): Enable atuin and ble.sh out of the box
Retrieves and extracts ble.sh. Enables both atuin and ble.sh via the bashrc
1 parent 8d7cd31 commit b55076b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

toolboxes/bluefin-cli/Containerfile.bluefin-cli

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@ RUN sed -i '349,489 s/^/#/' /usr/bin/entrypoint && \
2424
sed -i '499,1355 s/^/#/' /usr/bin/entrypoint && \
2525
sed -i '1357 s/^/#/' /usr/bin/entrypoint
2626

27-
# Change root shell to BASH
28-
RUN sed -i -e '/^root/s/\/bin\/ash/\/bin\/bash/' /etc/passwd
27+
# Use and configure bash, retrieve ble.sh
28+
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 && \
29+
mkdir -p /usr/share/blesh && \
30+
tar xJf /tmp/ble.tar.xz -C /usr/share/blesh --strip-components=1 && \
31+
sed -i -e '/^root/s/\/bin\/ash/\/bin\/bash/' /etc/passwd

toolboxes/bluefin-cli/files/etc/bashrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ if [ -z "$BASHRCSOURCED" ]; then
4848
STARSHIP_CONFIG=/etc/starship.toml
4949
export STARSHIP_CONFIG
5050
eval "$(starship init $SHELL)"
51+
52+
# Enable atuin and ble.sh
53+
source /usr/share/blesh/ble.sh
54+
eval "$(atuin init $SHELL)"
5155
fi
5256

5357

0 commit comments

Comments
 (0)