forked from asg017/sqlite-vec
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·30 lines (23 loc) · 743 Bytes
/
Copy pathrun.sh
File metadata and controls
executable file
·30 lines (23 loc) · 743 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
#!/bin/bash
# Run script for the Lua example
set -e
echo "=== SQLite-Vec Lua Example Runner ==="
# Check if Lua is available
if ! command -v lua &> /dev/null; then
echo "Error: Lua is not installed or not in PATH"
exit 1
fi
# Check if lsqlite3 is available
if ! lua -e "require('lsqlite3')" 2>/dev/null; then
echo "Error: lsqlite3 module is not installed"
echo "Install with: luarocks install lsqlite3"
exit 1
fi
# Check if sqlite-vec extension exists
if [ ! -f "../../dist/vec0.so" ] && [ ! -f "../../dist/vec0.dylib" ] && [ ! -f "../../dist/vec0.dll" ]; then
echo "Error: sqlite-vec extension not found in ../../dist/"
echo "Build with: cd ../.. && make loadable"
exit 1
fi
# Run the demo
lua demo.lua