-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·27 lines (23 loc) · 745 Bytes
/
dev.sh
File metadata and controls
executable file
·27 lines (23 loc) · 745 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
#!/usr/bin/env bash
set -euo pipefail
mode="run"
if [ "${1:-}" = "--test" ]; then
mode="test"
shift
fi
# Use local DuckDB if it exists, otherwise fall back to download
if [ -d "./libduckdb" ]; then
export DUCKDB_LIB_DIR="$(pwd)/libduckdb"
export DUCKDB_INCLUDE_DIR="$DUCKDB_LIB_DIR"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:$DUCKDB_LIB_DIR"
unset DUCKDB_DOWNLOAD_LIB
else
export DUCKDB_DOWNLOAD_LIB=1
fi
if [ "$mode" = "test" ]; then
# Keep test scope aligned with the DuckDB-backed library code path.
cargo test -p landscape --lib --features metric-duckdb "$@"
else
# Run cargo with metric-duckdb enabled (dynamic linking) plus any extra arguments.
cargo run --features metric-duckdb "$@"
fi