25 lines
505 B
Bash
Executable File
25 lines
505 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
cd "$ROOT_DIR"
|
|
|
|
if [[ $# -lt 1 ]]; then
|
|
echo "用法: scripts/rebuild_historical_report.sh YYYY-MM-DD" >&2
|
|
exit 1
|
|
fi
|
|
|
|
REPORT_DATE="$1"
|
|
shift || true
|
|
|
|
if [[ -f ".env.local" ]]; then
|
|
# shellcheck disable=SC1091
|
|
source ".env.local"
|
|
fi
|
|
if [[ -f ".env" ]]; then
|
|
# shellcheck disable=SC1091
|
|
source ".env"
|
|
fi
|
|
|
|
REPORT_DATE="$REPORT_DATE" go run -tags llm_script ./scripts/generate_daily_report.go "$@"
|