@echo off

REM This script can be replaced with the one you get from https://app.reportr.com/self-host

set SCRIPT_FOLDER=%~dp0
cd /d %SCRIPT_FOLDER%

if exist bin\reportr.exe goto foundexe
echo Can't find %SCRIPT_FOLDER%bin\reportr.exe
echo Download Windows binaries from https://reportr.com/windows
goto done

:foundexe
if not "%VDB_HOST_ID%" == "" goto foundvars
echo Reportr environment variables are not set.
echo To get the environment variables visit https://app.reportr.com/self-host
goto done

:foundvars
cd bin
.\reportr.exe

:done
