#!/usr/bin/env bash
set -u

report_cmd=${OD_LIVE_REPORT_CMD:-od-live-report}
if ! command -v "$report_cmd" >/dev/null 2>&1; then
  printf 'od-live-report-refresh: %s is not installed; report was not refreshed\n' "$report_cmd" >&2
  exit 0
fi

"$report_cmd" >/dev/null
rc=$?
if [[ $rc -ne 0 ]]; then
  printf 'od-live-report-refresh: report refresh failed (rc=%s)\n' "$rc" >&2
fi
exit 0
