-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·60 lines (49 loc) · 1.46 KB
/
run.sh
File metadata and controls
executable file
·60 lines (49 loc) · 1.46 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash
# Main build script - generates CV and website from JSON data
set -e
# Default template
TEMPLATE="${1:-t1}"
if [[ "$TEMPLATE" != "t1" && "$TEMPLATE" != "t2" ]]; then
echo "❌ Invalid template. Use: ./run.sh [t1|t2]"
echo " t1 = Simple clean template (default)"
echo " t2 = ModernCV template"
exit 1
fi
echo "🔄 Building with template: $TEMPLATE"
echo ""
# Generate LaTeX and website content
echo "📝 Generating content from JSON..."
if [ "$TEMPLATE" = "t1" ]; then
python3 scripts/generate-t1.py
else
python3 scripts/generate-t2.py
fi
echo ""
echo "🌐 Generating website..."
python3 scripts/generate-website.py
echo ""
echo "� Generating search index..."
python3 scripts/generate-search-index.py
echo ""
echo "�📄 Building PDF..."
if [ "$TEMPLATE" = "t1" ]; then
# Build simple template with xelatex
cd templates/simple/
xelatex -interaction=nonstopmode cv.tex > /dev/null 2>&1
xelatex -interaction=nonstopmode cv.tex > /dev/null 2>&1
cp cv.pdf ../../docs/Resume.pdf
cd ../..
else
# Build moderncv template
cd cv_template-main/src/cv/lang/en/
pdflatex -interaction=nonstopmode cv.tex > /dev/null 2>&1
pdflatex -interaction=nonstopmode cv.tex > /dev/null 2>&1
cp cv.pdf ../../../../../docs/Resume.pdf
cd ../../../../..
fi
echo ""
echo "✅ Build complete!"
echo " 📄 docs/Resume.pdf"
echo " 🌐 docs/index.md"
echo ""
echo "Next: git add . && git commit -m 'Update CV' && git push"