File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -e
4+
5+ SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
6+
7+ source " $SCRIPT_DIR /functions"
8+
9+ # Check if we're in the right directory
10+ # TODO: actually check the directory as well as the devbox.json?
11+ if [ ! -f " devbox.json" ]; then
12+ print_error " Please run this script from the root of the benefit-decision-toolkit project"
13+ exit 1
14+ fi
15+
16+ print_status " 🔍 Checking for existing devbox installation..."
17+
18+ if ! command_exists devbox; then
19+ print_warning " Devbox not found. Installing devbox..."
20+ if command_exists curl; then
21+ curl -fsSL https://get.jetify.com/devbox/install.sh | bash
22+ print_success " Devbox installed"
23+ else
24+ print_error " curl not found. Please install devbox manually: https://www.jetify.com/devbox/docs/contributor-quickstart/"
25+ exit 1
26+ fi
27+ else
28+ print_status " devbox already installed."
29+ fi
30+
31+ print_status " 📦 Setting up devbox environment..."
32+ if [ -f " devbox.json" ]; then
33+ devbox install
34+ print_success " Devbox environment initialized"
35+ else
36+ print_error " devbox.json not found"
37+ exit 1
38+ fi
You can’t perform that action at this time.
0 commit comments