samhuri.net/bin/bootstrap
Sami Samhuri 007b1058b6
Migrate from Swift to Ruby (#33)
Replace the Swift site generator with a Ruby and Phlex implementation.
Loads site and projects from TOML, derive site metadata from posts.

Migrate from make to bake and add standardrb and code coverage tasks.

Update CI and docs to match the new workflow, and remove unused
assets/dependencies plus obsolete tooling.
2026-02-07 21:19:03 -08:00

37 lines
809 B
Bash
Executable file

#!/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"
if ! rbenv exec gem list -i bundler >/dev/null 2>/dev/null; then
rbenv exec gem install bundler
fi
rbenv exec bundle install
else
echo "*** rbenv not found, using system Ruby"
if ! gem list -i bundler >/dev/null 2>/dev/null; then
gem install bundler
fi
bundle install
fi
echo "*** done"