[READ-ONLY] Mirror of https://github.com/mrgnw/cv.
1#!/bin/bash
2
3# Start the dev server in the background
4echo "🚀 Starting dev server..."
5bun run dev --host &
6DEV_PID=$!
7
8# Wait a moment for the dev server to start
9sleep 3
10
11# Start PDF watcher
12echo "👀 Starting PDF watcher..."
13node pdf-cli.js --watch &
14PDF_PID=$!
15
16# Function to cleanup on exit
17cleanup() {
18 echo "🛑 Shutting down..."
19 kill $DEV_PID $PDF_PID 2>/dev/null
20 exit 0
21}
22
23# Trap signals to ensure cleanup
24trap cleanup SIGTERM SIGINT
25
26# Wait for either process to exit
27wait $DEV_PID $PDF_PID