22 lines
520 B
Bash
Executable File
22 lines
520 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT="/home/openclaw/.openclaw/workspace"
|
|
SKILL_DIR="$ROOT/skills/searxng-local-search"
|
|
ENV_FILE="$ROOT/.env"
|
|
|
|
if [[ -f "$ENV_FILE" ]]; then
|
|
set -a
|
|
# shellcheck disable=SC1090
|
|
source "$ENV_FILE"
|
|
set +a
|
|
fi
|
|
|
|
if [[ $# -lt 1 ]]; then
|
|
echo "Usage: scripts/search.sh \"query\" '[{"category":"news","time_range":"day","num_results":5}]'" >&2
|
|
echo "Example: scripts/search.sh \"openclaw ai\" '{\"num_results\":3}'" >&2
|
|
exit 1
|
|
fi
|
|
|
|
exec bb "$SKILL_DIR/scripts/search.clj" "$@"
|