mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-04-27 14:57:40 +00:00
Restore bootstrap script for pre-Bake setup
This commit is contained in:
parent
84543b5cc0
commit
24c41eea08
2 changed files with 38 additions and 1 deletions
|
|
@ -15,12 +15,18 @@ This repository is now a single integrated Ruby project. The legacy Swift genera
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Ruby `3.4.1` (see `.ruby-version`)
|
- Ruby (see `.ruby-version`)
|
||||||
- Bundler
|
- Bundler
|
||||||
- `rbenv` recommended
|
- `rbenv` recommended
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bin/bootstrap
|
||||||
|
```
|
||||||
|
|
||||||
|
Or manually:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
rbenv install -s "$(cat .ruby-version)"
|
rbenv install -s "$(cat .ruby-version)"
|
||||||
rbenv exec bundle install
|
rbenv exec bundle install
|
||||||
|
|
|
||||||
31
bin/bootstrap
Executable file
31
bin/bootstrap
Executable file
|
|
@ -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"
|
||||||
Loading…
Reference in a new issue