-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·33 lines (27 loc) · 1019 Bytes
/
setup.sh
File metadata and controls
executable file
·33 lines (27 loc) · 1019 Bytes
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
#!/usr/bin/env bash
set -e # Stop on first error
echo "=== Setting up environment ==="
# Check prerequisites
command -v java >/dev/null 2>&1 || { echo >&2 "Java not found. Please install Java 17+."; exit 1; }
command -v node >/dev/null 2>&1 || { echo >&2 "Node.js not found. Please install Node.js 18+."; exit 1; }
command -v npm >/dev/null 2>&1 || { echo >&2 "npm not found. Please install npm."; exit 1; }
command -v mvn >/dev/null 2>&1 || { echo >&2 "Maven not found. Please install Maven."; exit 1; }
command -v stack >/dev/null 2>&1 || { echo >&2 "Haskell Stack not found. Please install Stack."; exit 1; }
# === Frontend ===
echo "=== Installing frontend dependencies ==="
cd frontend
npm install
cd ..
# === Backend ===
echo "=== Building backend ==="
cd backend
mvn clean install
cd ..
# === Haskell project ===
if [ -d "Re-Implementations/todo-haskell" ]; then
echo "=== Building Haskell project ==="
cd Re-Implementations/todo-haskell
stack build
cd ..
fi
echo "=== Setup complete ==="