-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsimple_verify.sh
More file actions
executable file
·91 lines (79 loc) · 2.85 KB
/
simple_verify.sh
File metadata and controls
executable file
·91 lines (79 loc) · 2.85 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/bin/bash
echo "🧪 Simple Plug and Play Verification"
echo "======================================"
echo ""
# Step 1: Check if venv exists
echo "1️⃣ Virtual Environment Check"
if [ -f "./face_auth_env/bin/python" ]; then
echo " ✅ EXISTS at ./face_auth_env/bin/python"
PYTHON_VER=$(./face_auth_env/bin/python --version 2>&1)
echo " 📦 Version: $PYTHON_VER"
else
echo " ❌ NOT FOUND (will be created on first run)"
fi
echo ""
# Step 2: Check dependencies
echo "2️⃣ Dependencies Check"
if [ -f "./face_auth_env/bin/python" ]; then
if ./face_auth_env/bin/python -c "import face_recognition" 2>/dev/null; then
FR_VER=$(./face_auth_env/bin/python -c "import face_recognition; print(face_recognition.__version__)" 2>&1)
echo " ✅ face_recognition: $FR_VER"
else
echo " ❌ face_recognition: NOT INSTALLED"
fi
if ./face_auth_env/bin/python -c "import cv2" 2>/dev/null; then
CV_VER=$(./face_auth_env/bin/python -c "import cv2; print(cv2.__version__)" 2>&1)
echo " ✅ opencv-python: $CV_VER"
else
echo " ❌ opencv-python: NOT INSTALLED"
fi
if ./face_auth_env/bin/python -c "import numpy" 2>/dev/null; then
echo " ✅ numpy: INSTALLED"
else
echo " ❌ numpy: NOT INSTALLED"
fi
else
echo " ⏭️ SKIPPED (no venv yet)"
fi
echo ""
# Step 3: Check binary
echo "3️⃣ Binary Check"
if [ -f "./target/release/face_auth" ]; then
SIZE=$(du -h ./target/release/face_auth | cut -f1)
echo " ✅ EXISTS at ./target/release/face_auth"
echo " 📏 Size: $SIZE"
else
echo " ❌ NOT BUILT (run: cargo build --release)"
fi
echo ""
# Step 4: Summary
echo "════════════════════════════════════════"
echo " SUMMARY"
echo "════════════════════════════════════════"
ALL_GOOD=true
if [ ! -f "./target/release/face_auth" ]; then
echo "⚠️ Need to build: cargo build --release"
ALL_GOOD=false
fi
if [ ! -f "./face_auth_env/bin/python" ]; then
echo "ℹ️ Virtual environment will be created automatically on first run"
fi
if [ -f "./face_auth_env/bin/python" ]; then
if ! ./face_auth_env/bin/python -c "import face_recognition" 2>/dev/null; then
echo "⚠️ Dependencies incomplete (will auto-install on first run)"
fi
fi
if [ "$ALL_GOOD" = true ] && [ -f "./face_auth_env/bin/python" ]; then
if ./face_auth_env/bin/python -c "import face_recognition, cv2" 2>/dev/null; then
echo ""
echo "✅ READY TO USE!"
echo ""
echo "Run: ./target/release/face_auth"
fi
else
echo ""
echo "🚀 PLUG AND PLAY MODE:"
echo " Just run: ./target/release/face_auth"
echo " Everything will auto-setup!"
fi
echo ""