Implement verified weekly archives and SQLite inventory reporting
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
repo_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
if [[ -n "${PYTHON:-}" ]]; then
|
||||
python_bin="$PYTHON"
|
||||
elif [[ -n "${VIRTUAL_ENV:-}" && -x "$VIRTUAL_ENV/bin/python" ]]; then
|
||||
python_bin="$VIRTUAL_ENV/bin/python"
|
||||
elif [[ -x "$repo_dir/.venv/bin/python" ]]; then
|
||||
python_bin="$repo_dir/.venv/bin/python"
|
||||
else
|
||||
python_bin=python3
|
||||
fi
|
||||
if ! command -v "$python_bin" >/dev/null 2>&1; then
|
||||
printf 'Python not found. Install Python 3.12+ and dependencies; see README.md.\n' >&2
|
||||
exit 127
|
||||
fi
|
||||
export PYTHONPATH="$repo_dir/src${PYTHONPATH:+:$PYTHONPATH}"
|
||||
export ARCHIVE_ENV_FILE="${ARCHIVE_ENV_FILE:-$repo_dir/.env}"
|
||||
exec "$python_bin" -m btcdata_archive.report "$@"
|
||||
Reference in New Issue
Block a user