From 24c41eea0800cd14773ba247ba4b4cbbcf47a28e Mon Sep 17 00:00:00 2001 From: Sami Samhuri Date: Sat, 7 Feb 2026 17:26:40 -0800 Subject: [PATCH] Restore bootstrap script for pre-Bake setup --- Readme.md | 8 +++++++- bin/bootstrap | 31 +++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100755 bin/bootstrap diff --git a/Readme.md b/Readme.md index 7b4d84f..f33afda 100644 --- a/Readme.md +++ b/Readme.md @@ -15,12 +15,18 @@ This repository is now a single integrated Ruby project. The legacy Swift genera ## Requirements -- Ruby `3.4.1` (see `.ruby-version`) +- Ruby (see `.ruby-version`) - Bundler - `rbenv` recommended ## Setup +```bash +bin/bootstrap +``` + +Or manually: + ```bash rbenv install -s "$(cat .ruby-version)" rbenv exec bundle install diff --git a/bin/bootstrap b/bin/bootstrap new file mode 100755 index 0000000..74ec8fa --- /dev/null +++ b/bin/bootstrap @@ -0,0 +1,31 @@ +#!/bin/bash + +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "$0")/.." && pwd)" +RUBY_VERSION="$(cat "$ROOT_DIR/.ruby-version")" + +if [[ "$(uname)" = "Linux" ]]; then + echo "*** installing Linux prerequisites" + sudo apt install -y \ + build-essential \ + git \ + inotify-tools \ + libffi-dev \ + libyaml-dev \ + pkg-config \ + zlib1g-dev +fi + +cd "$ROOT_DIR" + +if command -v rbenv >/dev/null 2>/dev/null; then + echo "*** using rbenv (ruby $RUBY_VERSION)" + rbenv install -s "$RUBY_VERSION" + rbenv exec bundle install +else + echo "*** rbenv not found, using system Ruby" + bundle install +fi + +echo "*** done"