Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions lib/build_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ case "$OS" in
echo " NOTE: A dialog may have opened. Complete the installation and re-run this script."
fi

# rust is required for building Ruby from source
if brew list rust > /dev/null 2>&1; then
fmt_ok "rust already installed"
else
fmt_install "rust"
brew install rust
fi

# libyaml is required for building Ruby from source
if brew list libyaml > /dev/null 2>&1; then
fmt_ok "libyaml already installed"
Expand All @@ -32,6 +40,14 @@ case "$OS" in
fmt_install "build-essential"
sudo apt-get install -y -qq build-essential libssl-dev libreadline-dev zlib1g-dev libyaml-dev
fi

# rust is required for building Ruby from source
if dpkg -s rustc > /dev/null 2>&1; then
fmt_ok "rust already installed"
else
fmt_install "rust"
sudo apt-get install -y -qq rustc cargo
fi
;;
arch)
if pacman -Qi base-devel > /dev/null 2>&1; then
Expand All @@ -41,5 +57,12 @@ case "$OS" in
sudo pacman -S --noconfirm --needed base-devel
fi

# rust is required for building Ruby from source
if pacman -Qi rust > /dev/null 2>&1; then
fmt_ok "rust already installed"
else
fmt_install "rust"
sudo pacman -S --noconfirm --needed rust
fi
;;
esac
3 changes: 3 additions & 0 deletions lib/mise_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ fmt_header "Ruby (via mise)"
if mise which ruby > /dev/null 2>&1; then
fmt_ok "Ruby already available via mise"
else
echo 'setting mise ruby.compile=false'
mise settings ruby.compile=false

fmt_install "Ruby (latest stable via mise)"
mise use --global ruby@latest
fmt_ok "Ruby installed: $(mise exec -- ruby --version)"
Expand Down
Loading