Skip to content

Instantly share code, notes, and snippets.

@tripleo1
Created June 16, 2023 02:47
Show Gist options
  • Save tripleo1/1f464d691a9c51ff70619baf0d0b0339 to your computer and use it in GitHub Desktop.
Save tripleo1/1f464d691a9c51ff70619baf0d0b0339 to your computer and use it in GitHub Desktop.
Install bash2bb on Ubuntu

Install jdk and clojure

apt install openjdk-11-jdk
TBD

Add bbin to $PATH

echo 'export PATH="$PATH:$HOME/.babashka/bbin/bin"' >> ~/.$(basename $SHELL)rc && exec $SHELL

Download and install bbin

mkdir -p ~/.babashka/bbin/bin && curl -o- -L https://raw.githubusercontent.com/babashka/bbin/v0.1.13/bbin > ~/.babashka/bbin/bin/bbin && chmod +x ~/.babashka/bbin/bin/bbin

Install golang

apt install golang

Download and install

go install mvdan.cc/sh/v3/cmd/shfmt@latest

Check if ~/go/bin/ on PATH

shfmt
~/go/bin/shfmt

Add go to PATH

export PATH=~/go/bin/:$PATH
echo "export PATH=~/go/bin/:\$PATH" >> ~/.bashrc

Check

cat ~/.bashrc
shfmt
^C

Install babashka

curl -sLO https://raw.githubusercontent.com/babashka/babashka/master/install
chmod +x install
sudo ./install

Install bash2bb

bbin install io.github.pesterhazy/bash2bb

Test

git clone https://github.com/Sithuk/ubuntu-server-zfsbootmenu
cd ubuntu-server-zfsbootmenu/
bash2bb ubuntu_server_encrypted_root_zfs.sh 
$HOME/.local/share/.babashka/bbin/bin/bash2bb ubuntu_server_encrypted_root_zfs.sh 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment