-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·39 lines (31 loc) · 1.14 KB
/
build.sh
File metadata and controls
executable file
·39 lines (31 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# Build script for The Big Book of Agent Ops
set -e
echo "📚 Building The Big Book of Agent Ops..."
# Check if Python virtual environment exists
if [[ "$VIRTUAL_ENV" == "" ]] && [[ ! -d "venv" ]]; then
echo "⚠️ No virtual environment detected. Creating one..."
python3 -m venv venv
echo "✅ Virtual environment created. Activate with: source venv/bin/activate"
fi
# Install Python dependencies if requirements.txt exists
if [[ -f "requirements.txt" ]]; then
echo "📦 Installing Python dependencies..."
pip install -r requirements.txt
fi
# Check if Quarto is installed (after installing dependencies)
if ! command -v quarto &> /dev/null; then
echo "❌ Quarto CLI not found. Please ensure quarto-cli is installed via pip."
echo " Run: pip install quarto-cli"
exit 1
fi
# Clean previous build
if [[ -d "_book" ]]; then
echo "🧹 Cleaning previous build..."
rm -rf _book
fi
# Build the book (HTML only by default, PDF requires TeX)
echo "🔨 Building book (HTML)..."
quarto render --to html
echo "✅ Build complete! Book available in _book/ directory"
echo "🌐 To view locally: quarto preview"