-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-lean.sh
More file actions
executable file
·43 lines (33 loc) · 1.17 KB
/
Copy pathupdate-lean.sh
File metadata and controls
executable file
·43 lines (33 loc) · 1.17 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
40
41
42
43
#!/bin/bash
set -e
PROJECTS=("nf-validate" "parse-strat" "seq-embed")
echo "Starting Lean & Mathlib update process for all projects..."
for proj in "${PROJECTS[@]}"; do
echo "========================================"
echo "Updating project: $proj"
echo "========================================"
cd "$proj"
echo "1. Running lake update..."
lake update
echo "2. Syncing lean-toolchain to Mathlib's explicit version..."
if [ -f ".lake/packages/mathlib/lean-toolchain" ]; then
cp .lake/packages/mathlib/lean-toolchain ./lean-toolchain
echo "Toolchain perfectly synced."
else
echo "Warning: .lake/packages/mathlib/lean-toolchain not found. Skipping toolchain sync."
fi
echo "3. Fetching Mathlib cache..."
lake exe cache get
echo "4. Building project..."
if [ "$proj" == "nf-validate" ]; then
# For nf-validate, build both the default executable and the library target containing proofs
lake build
lake build NfValidate
else
lake build
fi
cd ..
echo "Finished $proj."
echo ""
done
echo "All projects updated and built successfully!"