diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-09-01 14:48:45 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-09-01 14:48:45 +0300 |
| commit | 8a6d697308162874a236c84aac0b0f8c7ac01f83 (patch) | |
| tree | ed7dc7e8c6f50d66bde721fae78576aede929f66 /distribution/install.cmd | |
| parent | b54a78aa510b87d1e3b56c619b72eaeb59e4a2a1 (diff) | |
refactor: separate website presentation from runtime
Diffstat (limited to 'distribution/install.cmd')
| -rw-r--r-- | distribution/install.cmd | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/distribution/install.cmd b/distribution/install.cmd new file mode 100644 index 00000000..325e3b38 --- /dev/null +++ b/distribution/install.cmd @@ -0,0 +1,21 @@ +@echo off +setlocal + +set "INSTALLER_URL=https://herdr.dev/install.ps1" +set "CURL_PROTOCOL=--proto =https --tlsv1.2" +if defined HERDR_INSTALLER_URL ( + set "INSTALLER_URL=%HERDR_INSTALLER_URL%" + set "CURL_PROTOCOL=--proto =http,https" +) +set "INSTALLER_PATH=%TEMP%\herdr-install-%RANDOM%-%RANDOM%.ps1" + +curl.exe --fail --silent --show-error --location --connect-timeout 30 --speed-limit 1024 --speed-time 30 %CURL_PROTOCOL% --output "%INSTALLER_PATH%" -- "%INSTALLER_URL%" +if errorlevel 1 ( + del /f /q "%INSTALLER_PATH%" >nul 2>&1 + exit /b 1 +) + +powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%INSTALLER_PATH%" %* +set "INSTALLER_EXIT=%ERRORLEVEL%" +del /f /q "%INSTALLER_PATH%" >nul 2>&1 +exit /b %INSTALLER_EXIT% |
