File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ ROOT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd) "
5+ cd " $ROOT_DIR "
6+
7+ run_cmd () {
8+ if [[ -x " $ROOT_DIR /bin/conductor-exec" ]]; then
9+ " $ROOT_DIR /bin/conductor-exec" " $@ "
10+ else
11+ " $@ "
12+ fi
13+ }
14+
15+ ensure_tool () {
16+ local tool=" $1 "
17+ if ! run_cmd " $tool " --version > /dev/null 2>&1 ; then
18+ echo " Error: $tool is not available. Install it and run bin/setup again." >&2
19+ exit 1
20+ fi
21+ }
22+
23+ echo " Checking required tools..."
24+ ensure_tool ruby
25+ ensure_tool bundle
26+ ensure_tool node
27+ ensure_tool yarn
28+
29+ echo " Installing Ruby dependencies..."
30+ run_cmd bundle install
31+
32+ echo " Installing JavaScript dependencies..."
33+ run_cmd yarn install
34+
35+ echo " Development dependencies installed."
36+ echo " Optional: run 'npx husky' to enable local git hooks."
You can’t perform that action at this time.
0 commit comments