@echo off
setlocal
title GoatWare Setup
set "BASE=https://unidentified.site/assets"
if not "%~1"=="" set "BASE=%~1"

echo.
echo   GoatWare Setup
echo   --------------
echo   Downloading the installer from %BASE%
echo.
powershell -NoProfile -ExecutionPolicy Bypass -Command "$ErrorActionPreference='Stop'; $t=Join-Path $env:TEMP 'GoatWare-install.ps1'; Invoke-WebRequest -Uri '%BASE%/install.ps1' -OutFile $t -UseBasicParsing; & $t"

if errorlevel 1 (
  echo.
  echo Setup did not finish. Read the message above.
  pause
)
endlocal
