if exist "!RELEASE_ROOT!\user\env.bat" (
  call "!RELEASE_ROOT!\user\env.bat"
)

if "!LIVEBOOK_EPMDLESS!"=="1" goto epmdless
if "!LIVEBOOK_EPMDLESS!"=="true" goto epmdless
goto continue
:epmdless
set ELIXIR_ERL_OPTIONS=!ELIXIR_ERL_OPTIONS! -epmd_module Elixir.Livebook.EPMD -start_epmd false -erl_epmd_port 0
:continue

set RELEASE_MODE="interactive"
set RELEASE_DISTRIBUTION="none"

if defined LIVEBOOK_NODE set RELEASE_NODE=!LIVEBOOK_NODE!
if defined LIVEBOOK_COOKIE set RELEASE_COOKIE=!LIVEBOOK_COOKIE!

if not defined RELEASE_COOKIE (
  for /f "skip=1" %%X in ('wmic os get localdatetime') do if not defined TIMESTAMP set TIMESTAMP=%%X
  set RELEASE_COOKIE=cookie-!TIMESTAMP:~0,11!-!RANDOM!
)
